From: Zoltan B. <zb...@du...> - 2006-03-15 22:10:15
|
Hi, I wanted to display a percent computed from two fields. This doesn't work: str(val(field1)/val(field)*100.0,3,2) Although this does work: str((val(field1)/val(field))*100.0,3,2) Note the extra parentheses. This is what I got in the terminal (RLIB=20 didn't crashed, though): RLIB EXPERIENCED A FATAL MATH ERROR WHILE TRYING TO PREFORM THE=20 FOLLOWING OPERATION: str * Error on Line 86: The Expression Was=20 [str(val(field1)/val(field2)*100.0,3,2)] * DATA TYPES ARE [UNKNOWN] [UNKNOWN] [UNKNOWN] PCODE Execution Error: str( Didn't Work PCODE Execution Error: [str(val(field2)/val(field2)*100.0,3,2)] on line [= 86] RLIB can't parse A / B * C but it can parse (A / B) * C. Is it documented somewhere? E.g. explicit parentheses are not only needed but required? Best regards, Zolt=E1n B=F6sz=F6rm=E9nyi |
From: Bob D. <bd...@si...> - 2006-03-16 15:16:01
|
Ok.. This is fixed in CVS. On Wed, 2006-03-15 at 23:10 +0100, Zoltan Boszormenyi wrote: > Hi, >=20 > I wanted to display a percent computed from two fields. >=20 > This doesn't work: >=20 > str(val(field1)/val(field)*100.0,3,2) >=20 > Although this does work: >=20 > str((val(field1)/val(field))*100.0,3,2) >=20 > Note the extra parentheses. This is what I got in the terminal (RLIB=20 > didn't crashed, though): >=20 > RLIB EXPERIENCED A FATAL MATH ERROR WHILE TRYING TO PREFORM THE=20 > FOLLOWING OPERATION: str > * Error on Line 86: The Expression Was=20 > [str(val(field1)/val(field2)*100.0,3,2)] > * DATA TYPES ARE [UNKNOWN] [UNKNOWN] [UNKNOWN] > PCODE Execution Error: str( Didn't Work > PCODE Execution Error: [str(val(field2)/val(field2)*100.0,3,2)] on line= [86] >=20 > RLIB can't parse A / B * C but it can parse (A / B) * C. > Is it documented somewhere? > E.g. explicit parentheses are not only needed but required? >=20 > Best regards, > Zolt=C3=A1n B=C3=B6sz=C3=B6rm=C3=A9nyi >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting lang= uage > that extends applications into web and mobile media. Attend the live we= bcast > and join the prime developer group breaking into this new coding territ= ory! > http://sel.as-us.falkag.net/sel?cmd____________________________________= ___________ > Rlib-devel mailing list > Rli...@li... > https://lists.sourceforge.net/lists/listinfo/rlib-devel |
From: Zoltan B. <zb...@du...> - 2006-03-16 22:04:07
|
Hi! Thanks, it works OK. It even fixed another bug I just noticed before=20 updating from CVS: str(0-val(field),10,3) produced bad strings like "0-" with some spaces before and after=20 depending on the alignment. I works after your fixes, though. Thanks again. Best regards, Zolt=C3=A1n B=C3=B6sz=C3=B6rm=C3=A9nyi Bob Doan =C3=ADrta: >Ok.. This is fixed in CVS. > > >On Wed, 2006-03-15 at 23:10 +0100, Zoltan Boszormenyi wrote: > =20 > >>Hi, >> >>I wanted to display a percent computed from two fields. >> >>This doesn't work: >> >>str(val(field1)/val(field)*100.0,3,2) >> >>Although this does work: >> >>str((val(field1)/val(field))*100.0,3,2) >> >>Note the extra parentheses. This is what I got in the terminal (RLIB=20 >>didn't crashed, though): >> >>RLIB EXPERIENCED A FATAL MATH ERROR WHILE TRYING TO PREFORM THE=20 >>FOLLOWING OPERATION: str >> * Error on Line 86: The Expression Was=20 >>[str(val(field1)/val(field2)*100.0,3,2)] >> * DATA TYPES ARE [UNKNOWN] [UNKNOWN] [UNKNOWN] >>PCODE Execution Error: str( Didn't Work >>PCODE Execution Error: [str(val(field2)/val(field2)*100.0,3,2)] on line= [86] >> >>RLIB can't parse A / B * C but it can parse (A / B) * C. >>Is it documented somewhere? >>E.g. explicit parentheses are not only needed but required? >> >>Best regards, >>Zolt=C3=A1n B=C3=B6sz=C3=B6rm=C3=A9nyi >> >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by xPML, a groundbreaking scripting lang= uage >>that extends applications into web and mobile media. Attend the live we= bcast >>and join the prime developer group breaking into this new coding territ= ory! >>http://sel.as-us.falkag.net/sel?cmd____________________________________= ___________ >>Rlib-devel mailing list >>Rli...@li... >>https://lists.sourceforge.net/lists/listinfo/rlib-devel >> =20 >> > > > >------------------------------------------------------- >This SF.Net email is sponsored by xPML, a groundbreaking scripting langu= age >that extends applications into web and mobile media. Attend the live web= cast >and join the prime developer group breaking into this new coding territo= ry! >http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=110944&bid$1720&dat=121642 >_______________________________________________ >Rlib-devel mailing list >Rli...@li... >https://lists.sourceforge.net/lists/listinfo/rlib-devel > > =20 > |
From: Bob D. <bd...@si...> - 2006-03-22 15:31:33
|
Great! If you every have problems put together an example for me in: src/examples/php/expression* If you are feeling brave you can debug it in pcode.c=20 Helpful functions are rlib_pcode_dump resolution.c has commented out dumps in import places - bob On Thu, 2006-03-16 at 23:03 +0100, Zoltan Boszormenyi wrote: > Hi! >=20 > Thanks, it works OK. It even fixed another bug I just noticed before=20 > updating from CVS: >=20 > str(0-val(field),10,3) >=20 > produced bad strings like "0-" with some spaces before and after=20 > depending on the alignment. > I works after your fixes, though. >=20 > Thanks again. >=20 > Best regards, > Zolt=C3=A1n B=C3=B6sz=C3=B6rm=C3=A9nyi >=20 > Bob Doan =C3=ADrta: >=20 > >Ok.. This is fixed in CVS. > > > > > >On Wed, 2006-03-15 at 23:10 +0100, Zoltan Boszormenyi wrote: > > =20 > > > >>Hi, > >> > >>I wanted to display a percent computed from two fields. > >> > >>This doesn't work: > >> > >>str(val(field1)/val(field)*100.0,3,2) > >> > >>Although this does work: > >> > >>str((val(field1)/val(field))*100.0,3,2) > >> > >>Note the extra parentheses. This is what I got in the terminal (RLIB=20 > >>didn't crashed, though): > >> > >>RLIB EXPERIENCED A FATAL MATH ERROR WHILE TRYING TO PREFORM THE=20 > >>FOLLOWING OPERATION: str > >> * Error on Line 86: The Expression Was=20 > >>[str(val(field1)/val(field2)*100.0,3,2)] > >> * DATA TYPES ARE [UNKNOWN] [UNKNOWN] [UNKNOWN] > >>PCODE Execution Error: str( Didn't Work > >>PCODE Execution Error: [str(val(field2)/val(field2)*100.0,3,2)] on li= ne [86] > >> > >>RLIB can't parse A / B * C but it can parse (A / B) * C. > >>Is it documented somewhere? > >>E.g. explicit parentheses are not only needed but required? > >> > >>Best regards, > >>Zolt=C3=A1n B=C3=B6sz=C3=B6rm=C3=A9nyi > >> > >> > >> > >>------------------------------------------------------- > >>This SF.Net email is sponsored by xPML, a groundbreaking scripting la= nguage > >>that extends applications into web and mobile media. Attend the live = webcast > >>and join the prime developer group breaking into this new coding terr= itory! > >>http://sel.as-us.falkag.net/sel?cmd__________________________________= _____________ > >>Rlib-devel mailing list > >>Rli...@li... > >>https://lists.sourceforge.net/lists/listinfo/rlib-devel > >> =20 > >> > > > > > > > >------------------------------------------------------- > >This SF.Net email is sponsored by xPML, a groundbreaking scripting lan= guage > >that extends applications into web and mobile media. Attend the live w= ebcast > >and join the prime developer group breaking into this new coding terri= tory! > >http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=110944&bid$1720&dat=121642 > >_______________________________________________ > >Rlib-devel mailing list > >Rli...@li... > >https://lists.sourceforge.net/lists/listinfo/rlib-devel > > > > =20 > > |