Macro: GLOBAL_VARIABLE

Module location: FMAC line 13113 (view source)

#COMMAND GLOBAL$Scalar R R #CHECK !2 _RT #IFSAME !1 STRING // strings are treated as special because they have a set of values. #IF (!0>2) #IFDEF !3 #CHECK !3 _VSWDF #STR V$ !3 #REPLACE !2 |VS!v #IF (!0>3) Global$Scalar !1 !4 !5 !6 !7 !8 !9 #ENDIF #ELSE #STR V$ 80 #REPLACE !2 |VS!v Global$Scalar !1 !3 !4 !5 !6 !7 !8 !9 #ENDIF #ELSE #STR V$ 80 #REPLACE !2 |VS!v #ENDIF #ELSE #PUSH !q #DTYPE Q$ !1 // get the property type in q #IF (!q=19) //It's a struct #PUSH !h #STRG H$ !1 #STRV V$ !h #REPLACE !2 |VK!vV!h #POP H$ #ELSE #SPUSH // #SET $$ TYPE$SYMBOL$!1 // #REM arg is !$ // Scalar$Variable$Help !2 TYPE$SYMBOL$G$!1 // V // Scalar$Variable$Help !2 !$ V #DTSYM !1 #REPLACE !2 |V!$!v // ZG #REM !2 ------------------------------------ #SPOP #ENDIF #POP Q$ #IF (!0>2) GLOBAL$Scalar !1 !3 !4 !5 !6 !7 !8 !9 #ENDIF #ENDCOMMAND

  #PUSH !q
  #DTYPE Q$ !1
  #IF (!q=-1)
    #ERROR DFERR_COMP_INVALID_DATATYPE (!1)
  #ELSE
    #IFADIM !2       // if a global array, treat as such
      Global$Array !1 !2 !3 !4 !5 !6 !7 !8 !9
    #ELSE
      Global$Scalar !1 !2 !3 !4 !5 !6 !7 !8 !9
    #ENDIF // if aDim
  #ENDIF // if (!q=-1)
  #POP Q$