Search found 4 matches

by jgharston
Mon 22 Apr 2019, 04:00
Forum: Mathematics
Topic: fmod() in BASIC
Replies: 4
Views: 2227

Re: fmod() in BASIC

DEF FNfmod(x,y) LOCAL n% n%=x/y =x-y*n% If you can justify omitting the LOCAL statement (so that n% becomes a global) the benefit is even greater. The x/y is only used once, and without side effects, so - if x and y are always positive - you could do: DEFFNfmod(x,y)=x-y*INT(x/y) And, as previously ...
by jgharston
Mon 22 Apr 2019, 03:51
Forum: Graphics and Games
Topic: Urdu
Replies: 2
Views: 1107

Re: Urdu

The only way a computer program can tell what human language a text string contains is if you the programmer - or the user entering a user-supplied string - tells the program what human language the text string contains. Is "were made" English? Or German? Or Japanese written in Romanji? Is 電車 the Ch...
by jgharston
Mon 22 Apr 2019, 03:39
Forum: Database and Files
Topic: Trying to get "dir /s ..." to work from BASIC
Replies: 6
Views: 1961

Re: Trying to get "dir /s ..." to work from BASIC

OSCLI "dir .... calls BBC BASIC's *DIR command. If you want to force the use of OS's commands, bypassing BBC BASIC's *command layer (for any command), you need an additional *, viz: OSCLI "*dir .... or **dir ... as a direct command.
by jgharston
Mon 22 Apr 2019, 03:28
Forum: BBC BASIC language
Topic: Creating a new directory
Replies: 2
Views: 598

Re: Creating a new directory

You mention 'a directory structure' but you also mention 'create a directory'. Which do you mean? The code you posted has nothing to do with creating directories, that tells you the pathname the running application was run with. The 0 means "this application", the 260 means "260 bytes reserved for t...