Unit 'AmigaDOS' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#morphunits]

SetVar

Sets a local or environment variable

Declaration

Source position: amigados.pas line 2224

function SetVar(

  name: PChar;

  buffer: PChar;

  size: LongInt;

  flags: LongInt

):LongBool;

Arguments

name

  

pointer to an variable name. Note variable names follow filesystem syntax and semantics.

buffer

  

a user allocated area which contains a string that is the value to be associated with this variable.

size

  

combination of type of var to set (low 8 bits), and flags to control the behavior of this routine.

Function result

If non-zero, the variable was sucessfully set, False indicates failure.

Description

Sets a local or environment variable. It is advised to only use ASCII strings inside variables, but not required.

GVF_LOCAL_ONLY
set a local (to your process) variable.
GVF_GLOBAL_ONLY
set a global environment variable.

The default is to set a local environment variable.

See also

GetVar

  

Returns the value of a local or global variable

DeleteVar

  

Deletes a local or environment variable

FindVar

  

Finds a local variable


Documentation generated on: 2021-07-30