Does this help?

>> print "test" + "this"
** Script Error: Cannot use add on string! value.
** Where: print "test" + "this"
>> print "12345" + "23456"
** Script Error: Cannot use add on string! value.
** Where: print "12345" + "23456"
>> print to-string ((to-integer "12345") + (to-integer "23456"))
35801

---
At 01:20 PM 11/17/99 +0000, you wrote:
>what I'm trying to do is add two numbers passed on this query string
>
>sum.r?num1=3&num2=5
>
>and i'm getting this error
>
>** Script Error: Cannot use add on string! value. ** Where: cgi/num1 +
>cgi/num2 
>
>and this is the code I'm using
>********************************** start code **************
>print "Content-Type: text/html^/"  ;-- Required Page Header
>cgi: make object! decode-cgi system/options/cgi/query-string
>print [
>    <html><body><h2>"CGI Results:"</h2>
>       "result =" cgi/num1 + cgi/num2
>    </body><html>
>]
>********************************** end code **************
>
>is the problem on line 2 ?
>or is it something more simple
>
>Thanks
>Donal
>
>"Up the REBOLUTION !" http://www.rebol.com
>
>Donal Greene,
>Webmaster,
>Educational Multimedia Corporation (Ireland)
>EMG House
>Deansgrange
>Co. Dublin
>Tel:  +353 1 289 9000 extension 302
>Fax: +353 1 289 9150
>
>
>
>

Reply via email to