[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Interesting issue around function calls defined with a space after the name
[Thread Prev] | [Thread Next]
- Subject: Interesting issue around function calls defined with a space after the name
- From: Brian G <brian@xxxxxxxxxxxxxxxx>
- Date: Tue, 14 Oct 2025 07:22:32 -0700
- To: GambasList <user@xxxxxxxxxxxxxxxxxxxxxx>
I have never encountered this behavior before.......When calling a programmatic function , a space after the name causes no issues. But for built in functions it causes an error?
In the ide, if you leave a space after most built in functions it fixes it, but not for shl or shr.
But in a script you can leave a space after any function.Those functions defined in and by the application have no issues with a space after the name and before the opening (.
Only build in functions fail in scripts with a space between the Name and the opening (.
The IDE corrects the issue after leaving the line by removing the spaces so it does not by default show up in most IDE based programs as the reformat takes care of it...
except apparently, shr and shl... there may be more examples. It can be confusing for a programmer when the errors show up and the code looks correct.
I wonder if the behavior should more consistently ignore the space between the function name and the opening ( ?
Dim a As Integer = 1a = testit (3) ' this works correctly a = Shl (a, 1) ' this creates an error and the IDE does not fix it up
^ Unexpected Shl print format(a,"#####0") sub testit(value as integer) as integer print "yes", value * 4 return 3*4 end -- ~~~~ Brian
Attachment:
OpenPGP_0x78BFB26402F48419.asc
Description: OpenPGP public key
Attachment:
OpenPGP_signature.asc
Description: OpenPGP digital signature
| Re: Interesting issue around function calls defined with a space after the name | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |