Menu

Handling Null Arguments

bstudtma
2017-06-17
2017-06-18
  • bstudtma

    bstudtma - 2017-06-17

    GT.M seems to encounter an error when a parameter is null.

    test(x) q x

    GTM>w $$test^XBAS()
    %GTM-E-UNDEF, Undefined local variable: x

    Is it possible to configure GT.M to handle null as a null string ("")?

     

    Last edit: bstudtma 2017-06-17
  • K.S. Bhaskar

    K.S. Bhaskar - 2017-06-18

    Look at the VIEW [NO]UNDEF command in the Programmers Guide.

    GTM>view "noundef" w a(b)
    
    GTM>view "undef" w a(b)  
    %GTM-E-UNDEF, Undefined local variable: b
    
    GTM>
    
     
  • bstudtma

    bstudtma - 2017-06-18

    Thanks, that helps. Setting the environment variable seems to do the trick.

    export gtm_noundef=1

     

Log in to post a comment.