Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Optional integer argument in syntax command

    Hi,

    I've been having an issue where I get an 'invalid syntax' error whenever I try to run a program with an optional integer option.
    Code:
    prog def myprog
            syntax,  [myoption(integer)]
    end 
    myprog
    while this runs fine:
    Code:
    prog def myprog
            syntax,  myoption(integer)
    end 
    myprog
    I think this will be reproducible on any data:
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float x
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    end
    Thank you in advance!


  • #2
    Solved: Optional integer argument needs a default value.

    Code:
    prog def myprog
            syntax, [myoption(integer 1)]
    end 
    myprog

    Comment

    Working...
    X