Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #440
| From | "Ste (news)" <steve@revi11.plus.com> |
|---|---|
| Subject | Re: Font_DecodeMenu |
| Newsgroups | comp.sys.acorn.programmer |
| Date | 2011-06-15 21:19 +0100 |
| Message-ID | <51e3e527c5steve@revi11.plus.com> (permalink) |
| References | <51e32acc58Paul@sprie.nl> <mpro.lmsv0p01nzmww01kn.news@stevefryatt.org.uk> <4df83a04$0$14668$ba4acef3@reader.news.orange.fr> <mpro.lmuj8p02zu8sw01cg.news@stevefryatt.org.uk> |
| Organization | None |
In article <mpro.lmuj8p02zu8sw01cg.news@stevefryatt.org.uk>, Steve Fryatt <news@stevefryatt.org.uk> wrote: > 1. Preferring, for reasons of non-hack to do something like I think saying it's a 'hack' to use a deliberate, documented feature of the BASIC SYS statement is probably pushing it. Some people use OS_IntOn rather than XOS_GenerateError. I'm not sure which is fastest or best. There's only one way to find out. Fight! In my quick test, the OS_IntOn method was 30% faster if we call the SWI by name, whereas when calling the SWI by number, OS_IntOn was only 4% faster. This seems to show that calling SWIs by name is slow, especially the X form of SWIs and BASIC having to interpret a longer SWI name string doesn't help. > DEF FNread_string(string%) > LOCAL string$ > > string$ = "" The above is not required; BASIC initialises local variables for you. > WHILE ?string% <> 0 Why would you ever bother with the "<> 0" part? It's as pointless as LET. > string$ += CHR$(?string%) > string% += 1 > ENDWHILE > =string$ Finally, I'd use ptr% rather than string% to make it easier to read/understand. Well, I would if I didn't use XOS_GenerateError in the first place. Ta, Steve -- Steve Revill @ Home Note: All opinions expressed herein are my own.
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Font_DecodeMenu Paul Sprangers <Paul@sprie.nl> - 2011-06-14 12:24 +0200
Re: Font_DecodeMenu Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-06-14 15:54 +0200
Re: Font_DecodeMenu Martin Wuerthner <spamtrap@mw-software.com> - 2011-06-14 20:52 +0200
Re: Font_DecodeMenu Paul Sprangers <Paul@sprie.nl> - 2011-06-14 23:56 +0200
Re: Font_DecodeMenu Steve Fryatt <news@stevefryatt.org.uk> - 2011-06-14 22:43 +0100
Re: Font_DecodeMenu Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-06-15 06:50 +0200
Re: Font_DecodeMenu Martin Wuerthner <spamtrap@mw-software.com> - 2011-06-15 13:18 +0200
Re: Font_DecodeMenu Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-06-15 15:38 +0200
Re: Font_DecodeMenu Steve Drain <steve@kappa.me.uk> - 2011-06-15 17:20 +0100
Re: Font_DecodeMenu Steve Fryatt <news@stevefryatt.org.uk> - 2011-06-15 20:24 +0100
Re: Font_DecodeMenu "Ste (news)" <steve@revi11.plus.com> - 2011-06-15 21:19 +0100
Re: Font_DecodeMenu Steve Fryatt <news@stevefryatt.org.uk> - 2011-06-15 22:14 +0100
Re: Font_DecodeMenu "Ste (news)" <steve@revi11.plus.com> - 2011-06-16 14:35 +0100
Re: Font_DecodeMenu Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-06-16 18:10 +0200
Re: Font_DecodeMenu Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-06-16 18:04 +0200
Re: Font_DecodeMenu Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-06-16 18:51 +0200
Re: Font_DecodeMenu "Ste (news)" <steve@revi11.plus.com> - 2011-06-16 18:12 +0100
Re: Font_DecodeMenu John Tytgat <this@is.invalid> - 2011-06-21 19:19 +0200
Re: Font_DecodeMenu Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-06-22 19:18 +0200
Re: Font_DecodeMenu "Ste (news)" <steve@revi11.plus.com> - 2011-06-25 17:53 +0100
Re: Font_DecodeMenu John Tytgat <this@is.invalid> - 2011-06-27 13:06 +0200
Re: Font_DecodeMenu Alan Wrigley <spamhater@keepyourfilthyspamtoyourself.co.uk> - 2011-06-15 22:13 +0100
csiph-web