[pmwiki-users] zap - save math output to a variable

Karl kharris at bnin.net
Thu Sep 20 14:31:29 CDT 2007


Thx for the message

So in the example you gave, is math the name of a variable?

here is the syntax of my current zap form:

--------------------------------
(:input text E1 {$:E1} size=4:)
(:input text E2 {$:E2} size=4:)
(:input text E3 {$:E3} size=4:)
(:input text E4 {$:E4} size=4:)
(:input text E5 {$:E5} size=4:)
(:input text E6 {$:E6} size=4:)
(:input text E7 {$:E7} size=4:)

Total {(math '{$:E1}+{$:E2}+{$:E3}+{$:E4}+{$:E5}+{$:E6}+{$:E7}')}
--------------------------------

what I want to do is assign the output of the math calculation to 
another variable for use in another calculation.

TIA
Karl

The Editor wrote:
> I'm not using PmWiki anymore, but as I recall, ZAP has a built in math
> command that can be used for this right in the form, before the data
> values are saved. Somethig like
>
> (:input text field1 3:)
> (:input text field2 3:)
> (:zap math="{=field1} + {=field2}":)
> (:zap savedata=math:)
>
> Pardon any problems in the syntax as it's been quite a while since I
> switched to ZAPwiki.
>
> Cheers,
> Dan
>
>
> On 9/20/07, Karl <kharris at bnin.net> wrote:
>   
>> I am using a form to save numeric values to a series of variables.  Then
>> I use math to output totals of of those variables to the pmwiki screen.
>> What I want to do is assign these totals to other variables so I can
>> perform further calculations on these totals.
>>
>> Can anyone help with the syntax needed to do something like this.
>>
>> Karl
>>
>> _______________________________________________
>> pmwiki-users mailing list
>> pmwiki-users at pmichaud.com
>> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>>
>>     
>
>
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20070920/1960eb09/attachment-0001.html 


More information about the pmwiki-users mailing list