Discussion:
Very rusty programmer here
(too old to reply)
Brian Jordan
2019-10-06 22:31:09 UTC
Permalink
Same rusty programmer - new problem...

I /think I know/ that it is possible to read a system variable and to use
the result within a BASIC program. After a fruitless evening with the PRM
I wonder if someone could drop me a hint?
For instance I know that, eg using *SHOW, I see that Alias$@RunType_B28
returns information that shows NetSurf has 'claimed' this file type
(URL). I am trying to find a way to get that information into a string in
BASIC. I hope that it is the syntax rather than the concept that is
eluding me. Any hints appreciated.
Thanks
--
_____________________________________________________________________

Brian Jordan
RISC OS 5.23 on Raspberry Pi
_____________________________________________________________________
Sebastian Barthel
2019-10-07 03:05:41 UTC
Permalink
Post by Brian Jordan
Same rusty programmer - new problem...
I /think I know/ that it is possible to read a system variable and to
use the result within a BASIC program. After a fruitless evening with
the PRM I wonder if someone could drop me a hint?
"OS_ReadVarVal" should do the trick ...
Post by Brian Jordan
returns information that shows NetSurf has 'claimed' this file type
(URL). I am trying to find a way to get that information into a string
in BASIC.
Probably there is another variant to do this by using the OSCLI command.
with
OSCLI "SHOW Alias$RunType_B28"
You can command BASIC to do the same thing as You did on the command line.
News
2019-10-07 09:52:21 UTC
Permalink
Post by Brian Jordan
I /think I know/ that it is possible to read a system variable and
to use the result within a BASIC program.
Yes. You need something on the lines of:

DIM block% 256
SYS"OS_ReadVarVal", "MyApp$Dir", block%, 256, 0, 3 TO ,,len%
block%?len% = 13 :REM Basic terminator
path$ = $(block%)
--
Chris Johnson
Loading...