Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: math operations

From: carl:cybercraft at: 4-Aug-2001 13:34

On 04-Aug-01, john wrote:
> I have an HTML form serving numeric fields to a REBOL script and > everything works fine, until I attempt any minor math function. It > is reading the fields as a string. > All these codes returned the variables set from the HTML, and failed > at the multiplication with an error message that there is no value > data is a string. > _______________ > a: cgi/a > b: cgi/b > print a > print b > print multiply a b <-- failed here > ________________ > a: cgi/a > b: cgi/b > print a > print b > sum: func [a b] [a * b] <--failed here > sum a*b > ____________________ > Any help?
Convert your values to decimals or integers? ie... a: to-decimal cgi/a
> john
-- Carl Read