Page 1 of 1

doubt...

PostPosted: Mon Aug 18, 2003 11:31 am
by Nikolai4221
hi everyone...

if i take var1 = 5 and var2 = 10 and result = val1 - val2 then i am getting the result as 5- and i have to get that as -5. please suggest how to get that result as -5.

satya

PostPosted: Mon Aug 18, 2003 1:07 pm
by Jolin2218
Hi,

how did you define your vars?

try this example, it works:

Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1. data: var1 type i value 5,
  2.          var2 type i value 10,
  3.          erg type i.
  4.  
  5. var1 = 5.
  6. var2 = 10.
  7. erg = var1 - var2.
  8.  
  9. write: / erg.
  10.  
GeSHi ©


Regards,
Jens

the same result

PostPosted: Mon Aug 18, 2003 5:48 pm
by Nikolai4221
jens,

thanx for ur reply but the result would be the same as b4....the problem remains the same....check out ones running that program u sent....

regards
satya

PostPosted: Tue Aug 19, 2003 8:40 am
by Jolin2218
Hi satya,

sorry for the misunderstanding, I thought you won't get the sign at all. So if you want it before, use this:

Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1. write: / erg using edit mask 'V__________'.
  2.  
GeSHi ©


Regards,
Jens