Unit 'amigados' Package
[Overview][Constants][Types][Procedures and functions][Index] [#amunits]

DeleteVar

Deletes a local or environment variable

Declaration

Source position: amigados.pas line 1605

function DeleteVar(

  const name: PChar;

  flags: LongWord

):LongBool;

function DeleteVar(

  const name: string;

  flags: LongWord

):Boolean;

Arguments

name

  

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

flags

  

combination of type of var to delete (low 8 bits), and flags to control the behavior of this routine. Currently defined flags include: GVF_LOCAL_ONLY - delete a local (to your process) variable. GVF_GLOBAL_ONLY - delete a global environment variable. The default is to delete a local variable if found, otherwise a global environment variable if found (only for LV_VAR).

Function result

If not 0, the variable was sucessfully deleted, 0 indicates failure.

Arguments

name

  

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

flags

  

combination of type of var to delete (low 8 bits), and flags to control the behavior of this routine. Currently defined flags include: GVF_LOCAL_ONLY - delete a local (to your process) variable. GVF_GLOBAL_ONLY - delete a global environment variable. The default is to delete a local variable if found, otherwise a global environment variable if found (only for LV_VAR).

Description

Deletes a local or environment variable.

The default is to delete a local variable if one was found, or to delete a global environmental variable otherwise.

A global environmental variable will only be deleted for the type LV_VAR.

See also

GetVar

  

Returns the value of a local or global variable

SetVar

  

Sets a local or environment variable

FindVar

  

Finds a local variable

DOSDeleteFile

  

Delete a file or directory


Documentation generated on: 2021-07-30