log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- Latest hardware upgrade from RISCOSbits (News:)
- RISCOSbits releases a new laptop solution (News:4)
- Announcing the TIB 2024 Advent Calendar (News:2)
- RISC OS London Show Report 2024 (News:1)
- Code GCC produces that makes you cry #12684 (Prog:39)
- Rougol November 2024 meeting on monday (News:)
- Drag'n'Drop 14i1 edition reviewed (News:)
- WROCC November 2024 talk o...ay - Andrew Rawnsley (ROD) (News:2)
- October 2024 News Summary (News:3)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
Acorn Arcade forums: Programming: Strange PROC parameter symbols
 
  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
HandbagHandbag 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
HandbagHandbag 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
tribbles
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
HandbagHandbag 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
HandbagHandbag 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
tribbles
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
HandbagHandbag Boi
Posts: 3439
What's that then? (Layman's ;) )
  ^[ Log in to reply ]
 

Acorn Arcade forums: Programming: Strange PROC parameter symbols