Blitz (15/176)

From:David McMinn
Date:3 Jul 2001 at 12:33:05
Subject:Re: GetVar_

Hi Richard

> I have been trying to use the "GetVar_" command in Blitz. With little
> success. How do I use it?

By reading the autodocs.

> I have tried the following:
>
> print GetVar_("IAmStupid",65536,5,0)
>
> But all I get is a number like 4 or 5. Or -1 if I make up the varible (like
> above). So I can tell if the varible exists, but nothing else. I need to get
> hold of the value. Can you help me??

Something like this might work:

#BUFSIZE=256
Dim buff.b(#BUFSIZE) ; some buffer memory for the variable to be stored in
varname$="IAMSTUPID" ; better to have a variable for the name
reslen.l=GetVar_(&varname$, &buff(0), #BUFSIZE, 0)
If reslen=-1
If IoErr_=#ERROR_OBJECT_NOT_FOUND
NPrint "Variable not set"
EndIf
Else
NPrint varname$," = ",Peek$(&buff(0))
EndIf



|) /\ \/ ][ |) |\/| c |\/| ][ |\| |\| | dave@blitz-2000.co.uk
http://members.nbci.com/david_mcminn | ICQ=16827694
Needing someone is like needing a parachute. If they aren't there the
first time you need them, chances are you won't be needing them again.

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie