|
Strange PROC parameter symbols |
|
andrew (16:51 7/7/2004) cterran (17:20 7/7/2004) andrew (12:37 8/7/2004) tribbles (13:06 8/7/2004) andrew (18:41 8/7/2004) mavhc (23:57 8/7/2004) andrew (12:47 9/7/2004) tribbles (16:10 13/7/2004) andrew (13:28 17/7/2004)
|
|
Andrew |
Message #56750, posted by andrew at 16:51, 7/7/2004 |
Handbag Boi
Posts: 3439
|
I've been looking at some old BASIC listings for a function/procedure series in the superb Beebug magazine and many of the procedure definitions take this form:
DEF FNgc(_%,'%) =CHR$(FNpk(_%,'%))
also occasionally __%
What on earth does this mean? Perhaps I've missed an earlier issue where you are told to replace them with appropriate variables or something. |
|
[ Log in to reply ] |
|
Chris |
Message #56752, posted by cterran at 17:20, 7/7/2004, in reply to message #56750 |
Member
Posts: 163
|
Underscore is a perfectly legal character in BBC BASIC variable names, as is backquote. The % sign just means an integer variable.
People sometimes used these to ensure an even distribution of names, which results in faster lookup of variable values (less important now, with much faster machines). You also see them in crunched versions of programs. |
|
[ Log in to reply ] |
|
Andrew |
Message #56784, posted by andrew at 12:37, 8/7/2004, in reply to message #56752 |
Handbag Boi
Posts: 3439
|
Should have known about the % but I didn't about the underscore. That should reduce memory as well if it's a local variable and used frequently should it not?
[Edited by andrew at 13:37, 8/7/2004] |
|
[ Log in to reply ] |
|
Jason Tribbeck |
Message #56786, posted by tribbles at 13:06, 8/7/2004, in reply to message #56750 |
Captain Helix
Posts: 929
|
DEF FNgc(_%,'%) =CHR$(FNpk(_%,'%)) '% probably should be `% (i.e. back-tick rather than quote). That's also another legal character. I used it a lot in maths functions. |
|
[ Log in to reply ] |
|
Andrew |
Message #56791, posted by andrew at 18:41, 8/7/2004, in reply to message #56786 |
Handbag Boi
Posts: 3439
|
Apparently it's called 'grave' isn't it? |
|
[ Log in to reply ] |
|
Mark Scholes |
Message #56796, posted by mavhc at 23:57, 8/7/2004, in reply to message #56791 |
Member
Posts: 660
|
Apparently it's called 'grave' isn't it? When it's an accent, yes |
|
[ Log in to reply ] |
|
Andrew |
Message #56806, posted by andrew at 12:47, 9/7/2004, in reply to message #56796 |
Handbag Boi
Posts: 3439
|
I was going by Kappa's BASIC manual. |
|
[ Log in to reply ] |
|
Jason Tribbeck |
Message #56923, posted by tribbles at 16:10, 13/7/2004, in reply to message #56791 |
Captain Helix
Posts: 929
|
Apparently it's called 'grave' isn't it? Unicode 3.0 calls it "grave accent", with a variant called "reversed prime" (which is why I used it in maths functions). |
|
[ Log in to reply ] |
|
Andrew |
Message #57091, posted by andrew at 13:28, 17/7/2004, in reply to message #56923 |
Handbag Boi
Posts: 3439
|
What's that then? (Layman's ) |
|
[ Log in to reply ] |
|
|