1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Change in scrput behaviour

Discussion in 'Support' started by Peter Bratton, Nov 13, 2014.

  1. Peter Bratton

    Joined:
    Jul 1, 2008
    Messages:
    81
    Likes Received:
    0
    Running v17.00.52. Consider the command "scrput %_row 27 bri yel on bla %cel". In previous versions, the command worked as expected even if the variable %cel was empty or undefined. In v17 an empty/undefined variable triggers an error. Adding `` at the end of the command is a workaround
    --
    Peter
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    V17 tightened up on a number of previously ignored errors. Is there a reason you want to run a SCRPUT that doesn't actually do anything?
     
  3. Peter Bratton

    Joined:
    Jul 1, 2008
    Messages:
    81
    Likes Received:
    0
    No reason other than convenience. The line is taken from a btm file that reads records from a CSV file. Some of its records have empty fields, but I can't predict which. I'll work around it.
    --
    Peter
     
  4. Jay Sage

    Joined:
    Jun 2, 2008
    Messages:
    284
    Likes Received:
    1
    I think that you should be able to solve the problem simply by changing the command

    scrput %_row 27 bri yel on bla %cel​

    to

    if "%cel" NE "" scrput %_row 27 bri yel on bla %cel​
     
  5. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,301
    Likes Received:
    39
    Or even IF DEFINED CEL ....
     

Share This Page