Hi,

with the attached project, negative numbers (indicated by a minus sign in
fron of them) are treated differently under various circumstances:

0. Setup:
     $ tar -zxvf ColorSelect-1.1.37.tar.gz
     $ cd ColorSelect
     $ gbc3 -ga
     $ gba3
   Nothing to see here.

1. gbr3 -- everything as expected:
     $ gbr3 ColorSelect.gambas -- -10 10 10
   Correctly transfers the "-10" as an argument to the program which then
   displays an error.

2. gbx3 -- not working:
     $ gbx3 -- -10 10 10
     ColorSelect: unknown option: -1

3. gbx3 (when the project does NOT call Args.End()) -- working:
     $ vim .src/FColor.class  # Remove the Args.End(), line 17
     $ gbc3 -ga
     $ gbx3 -- -10 10 10
   Correctly transfers the argument.

(Now change the FColor.class back to again contain the Args.End() and
 recompile.)

4. gbx3 (with a cheap masking trick) -- working:
     $ gbx3 -- " -10" 10 10
   Correctly transfers the argument and Val()'ing it does the trick.

Why does gbr3 get it right? Why does the behaviour seem to depend on the
call to Args.End()? How are negative numbers supposed to be given here so
that gbr3 and gbx3 can handle them both (and not contain superfluous
whitespace)?

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk

Attachment: ColorSelect-1.1.37.tar.gz
Description: Binary data

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to