; ; var.sh ; ; Variable handling ; ; © 1995 Straylight ; ;----- Overview ------------------------------------------------------------- ; ; Functions provided: ; ; var_create ; var_find [ :LNOT::DEF:var__dfn GBLL var__dfn ; --- var_create --- ; ; On entry: R0 == type of variable ; R1 == pointer to variable name ; R2 == file address of label or DEF ; R3 == line number of label or DEF ; R12 == pointer to the anchor block ; ; On exit: R0 == pointer to the variable ; May return an error ; ; Use: Tries to find the variable given, and return a pointer ; to it if it is found. Otherwise it will try to create the ; variable and return a pointer to the new one. IMPORT var_create ; --- var_find --- ; ; On entry: R0 == type of the variable ; R1 == name of the variable ; ; On exit: CS if the variable was found, and ; R0 == pointer to the variable block ; CC otherwise ; ; Use: Tries to find the given variable in the current tree. IMPORT var_find ;----- Workspace ------------------------------------------------------------ ; --- Variable types --- ^ 0 vType_integer # 1 ;Integer vType_string # 1 ;String vType_dimInt # 1 ;DIM of integers vType_dimStr # 1 ;DIM of strings vType_label # 1 ;Label vType_proc # 1 ;Procedure name vType_fn # 1 ;Function name ; --- Lvalue types --- vType_lvInt # 1 ;Integer variable lvalue vType_lvString # 1 ;String variable lvalue vType_lvWord # 1 ;Word lvalue (from `!' op) vType_lvByte # 1 ;Byte lvalue (from `?' op) vType_lvBytes # 1 ;String lvalue (from `$' op) vType_lvIntArr # 1 ;Integer array lvalue vType_lvStrArr # 1 ;String array lvalue ] ;----- That's all, folks ---------------------------------------------------- END