Rocket U2 | UniVerse & UniData

 View Only
  • 1.  What does UC BASIC do with an asterick at end of logic line

    Posted 21 days ago

    Had some code doing strange things.  This is the example:

         IF VAR1 = "UNKNOWN" THEN *

      CALL SEND.EMAIL(ORDER.NO)

      do other things     

    There was no END statement.  My best guess was that U2 considered the "*" at the end as a NULL and allowed it to compile.

    Does anyone know?

    We changed it to be the following to solve the problem.

         IF VAR1 = "UNKNOWN" THEN

          CALL SEND.EMAIL(ORDER.NO)

          END

      do other things     



    ------------------------------
    Nelson Schroth
    president
    C3CompleteShop LLC
    Harrison OH US
    ------------------------------


  • 2.  RE: What does UC BASIC do with an asterick at end of logic line

    ROCKETEER
    Posted 21 days ago

    Hi Nelson,

    It does look to treat it as a NULL based on using VLIST. See below.

    >COPYP BP N1 N2 (TSN

         N1
          VAR1 = 100
          IF VAR1 = "UNKNOWN" THEN *
       END

         N2
          VAR1 = 100
          IF VAR1 = "UNKNOWN" THEN NULL
       END
    >VLIST BP N1
    Main Program "BP.O/N1"
    Compiler Version: 11.3.0.0
    Object Level    : 5
    Machine Type    : 0
    Local Variables : 1
    Subroutine args : 0
    Unnamed Common  : 0
    Named Common Seg: 0
    Object Size     : 28
    Source lines    : 3
    Object Date Time: 30 APR 2024 10:33:25

    00001:       VAR1 = 100
    00001 00000 : 0F8 move           100  => VAR1

    00002:       IF VAR1 = "UNKNOWN" THEN *
    00002 00006 : 06E eq             VAR1 "UNKNOWN"  => $R0
    00002 0000E : 2DE testfw         $R0 0001A:
    00002 00018 : 10C nop

    00003:    END
    00003 0001A : 190 stop
    >VLIST BP N2
    Main Program "BP.O/N2"
    Compiler Version: 11.3.0.0
    Object Level    : 5
    Machine Type    : 0
    Local Variables : 1
    Subroutine args : 0
    Unnamed Common  : 0
    Named Common Seg: 0
    Object Size     : 28
    Source lines    : 3
    Object Date Time: 30 APR 2024 10:33:25

    00001:       VAR1 = 100
    00001 00000 : 0F8 move           100  => VAR1

    00002:       IF VAR1 = "UNKNOWN" THEN NULL
    00002 00006 : 06E eq             VAR1 "UNKNOWN"  => $R0
    00002 0000E : 2DE testfw         $R0 0001A:
    00002 00018 : 10C nop

    00003:    END
    00003 0001A : 190 stop



    ------------------------------
    Neil Morris
    Universe Advanced Technical Support
    Rocket Software
    ------------------------------



  • 3.  RE: What does UC BASIC do with an asterick at end of logic line

    Posted 21 days ago

    Thanks Neil...never run into this before :-)



    ------------------------------
    Nelson Schroth
    president
    C3CompleteShop LLC
    Harrison OH US
    ------------------------------