a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Static lib:
 amiga.lib
  ACrypt
  AddTOF
  ArgArrayDone
  ArgArrayInit
  ArgInt
  ArgString
  BeginIO
  CallHook
  CallHookA
  CheckRexxMsg
  CoerceMethod
  CoerceMethodA
  CreateExtIO
  CreatePort
  CreateStdIO
  CreateTask
  CxCustom
  CxDebug
  CxFilter
  CxSender
  CxSignal
  CxTranslate
  DeleteExtIO
  DeletePort
  DeleteStdIO
  DeleteTask
  DoMethod
  DoMethodA
  DoSuperMethod
  DoSuperMethodA
  FastRand
  FreeIEvents
  GetRexxVar
  HookEntry
  HotKey
  InvertString
  LibAllocPooled
  LibCreatePool
  LibDeletePool
  LibFreePooled
  NewList
  RangeRand
  RemTOF
  SetRexxVar
  SetSuperAttrs
  TimeDelay
  afp
  arnd
  dbf
  fpa
  printf
  sprintf
  stdio
Include
GuruMeditation
Docs » Autodocs » amiga.lib » GetRexxVar

NAME

	GetRexxVar - Gets the value of a variable from a running ARexx program

SYNOPSIS

	error = GetRexxVar(message,varname,bufpointer)
D0,A1 A0 A1 (C-only)
LONG GetRexxVar(struct RexxMsg *,char *,char **);

FUNCTION

	This function will attempt to extract the value of the symbol
varname from the ARexx script that sent the message. When called
from C, a pointer to the extracted value will be placed in the
pointer pointed to by bufpointer. (*bufpointer will be the pointer
to the value)
When called from assembly, the pointer will be returned in A1.
The value string returned *MUST* *NOT* be modified.
While this function is new in the V37 amiga.lib, it is safe to
call it in all versions of the operating system. It is also
PURE code, thus usable in resident/pure executables.

NOTES

	This is a stub in amiga.lib.  It is only available via amiga.lib.
The stub has two labels. One, _GetRexxVar, takes the arguments
from the stack. The other, GetRexxVar, takes the arguments in
registers.
This routine does a CheckRexxMsg() on the message.

EXAMPLE

	char	*value;
/* Message is one from ARexx */
if (!GetRexxVar(rxmsg,"TheVar",&value))
{
/* The value was gotten and now is pointed to by value */
printf("Value of TheVar is %s\n",value);
}

INPUTS

	message		A message gotten from an ARexx script
varname The name of the variable to extract
bufpointer (For C only) A pointer to a string pointer.

RESULT

	error		0 for success, otherwise an error code.
(Other codes may exists, these are documented)
3 == Insufficient Storage
9 == String too long
10 == invalid message
A1 (Assembly only) Pointer to the string.

SEE ALSO

SetRexxVar(), CheckRexxMsg()

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Spaceballs

SPB
FC
AYS
ANA

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se