EnumDir in Obey files
David Gee (1833) 268 posts |
I want to be able to call
where $0 has the value *, list/txt is empty (but if I miss out the parameter altogether, the result is as expected). I’ve tried various combinations of angle brackets and none, but list/txt remains empty. What’s going on? Oh, and can I get the value of an environment variable in a BBC BASIC program? For example, if I want to open a file in, say, Wimp$ScrapDir? |
Colin (478) 2433 posts |
or to the screen
|
Bryan Hogan (339) 593 posts |
You can use the environment variable in the BASIC code: file%=OPENOUT ( “<Wimp$Scrapdir>.” + filename$ ) Or if you want to copy the value of an environment variable into a BASIC variable, then use SYS"OS_ReadVarVal" |
David Gee (1833) 268 posts |
Thanks for the help. I’ve been implementing a “retype” command so you can type
for example. When running RPCEmu on Linux, and working with a number of image files created on the host OS, I find it helpful. I’m hoping to make it generally available soon, but would like to know if there is a way of checking the number of parameters passed to an Obey file? |
John WILLIAMS (8368) 495 posts |
Note that you can use a wildcard with the EnumDir pattern. For example, your retype example could be:
and this could retype files with extensions of both /jpg and /jpeg |
Bryan Hogan (339) 593 posts |
Grrr, just noticed the OPENOUT line in my earlier post had been swallowed by the forum :-( Fixed. |