Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [Coyu] Small global for mathematical function

Quote Reply
Re: [Coyu] Small global for mathematical function In reply to
Hi,

Try;

Code:
sub {

my $aa = $_[0];
my $bb = $_[1];

my $cc = $aa / $bb;
my $dd = $aa - ($cc * $bb);

return { aa => $aa, bb => $bb, cc => $cc, dd => $dd }

}

Call with;

<%global_name(A,B)%> (where A or B are the number, or something like $FieldName).

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Subject Author Views Date
Thread Small global for mathematical function Coyu 4211 Oct 27, 2005, 5:32 AM
Thread Re: [Coyu] Small global for mathematical function
Andy 4105 Oct 27, 2005, 6:30 AM
Thread Re: [Andy] Small global for mathematical function
Coyu 4106 Oct 27, 2005, 6:34 AM
Thread Re: [Coyu] Small global for mathematical function
Andy 4118 Oct 27, 2005, 6:37 AM
Thread Re: [Andy] Small global for mathematical function
Coyu 4097 Oct 28, 2005, 8:53 AM
Thread Re: [Coyu] Small global for mathematical function
tandat 4101 Oct 28, 2005, 9:54 AM
Thread Re: [tandat] Small global for mathematical function
Coyu 4112 Oct 28, 2005, 10:09 AM
Post Re: [Coyu] Small global for mathematical function
tandat 4079 Oct 28, 2005, 10:15 AM