Using OBJECT subroutine

This is copied directly from page 314-315 of the PDF manual:
-------------
The attribute, ENV, is used to obtain or change certain operating system parameters.
For example, to get the PATH parameter, you might use:

LET parameter$ = “PATH”
LET values(1) = 0 ! Get
CALL Object (OBJM_SYSINFO, 0, “ENV”, parameter$, values())
PRINT parameter$
You might see something like “C:\;C:\WINDOWS;C:\TBSILVER”.
------------

So the following program was tried:

DIM values(1)
LET parameter$ = "PATH"
LET values(1) = 0 ! Get
CALL Object (OBJM_SYSINFO, 0, "ENV", parameter$, values())
PRINT parameter$
END

Instead, Silver 5.33 and Gold 5.5b19 both give:
"Unknown or invalid attribute in SET/GET. (-11225) 4 in Main Program"

Can anyone help with this? Why doesn't this work? Any help greatly appreciated.
Thanks.
Regards
MCC

Comments

OBJECT SUBROUTINES

My suggestion is to use the TrueControls library whenever possible. The routines there are more simple but ultimately use the Object subroutines. For example:

dim VALUES(6)

CALL tc_getsysinfo("APPLICATION NAME",FULLPATH$,VALUES())

will return the path from which the program is run.

In your example, try dimensioning VALUES to 6 as in my example. That always covers anything that gets set in the OBJECT subroutines that you might not want or be aware of.

rwt