Announcement

Collapse
No announcement yet.

Syntax Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Syntax Error

    I am using this code to go to a website

    CASE %IDM_HELP_GOTOBRIANHEIBERTNET
    LOCAL zString AS ASCIIZ * %MAX_PATH
    zString = "http://www.brianheibert.net"
    ShellExecute BYVAL %Null, "open", zString, BYVAL %Null, BYVAL %Null, %SW_ShowNormal
    CASE %IDM_HELP_REGISTER500
    LOCAL zString1 AS ASCIIZ * %MAX_PATH
    zString1 = "http://www.brianheibert.net/store.html"
    ShellExecute BYVAL %Null, "open", zString1,BYVAL,%Null, BYVAL %Null, %SW_ShowNormal

    %IDM_HELP_GOTOBRIANHEIBERTNET works
    %IDM_HELP_REGISTER500 produces this error when I copy the code into it

    This is in line 277
    CASE %IDM_HELP_REGISTER500
    LOCAL zString1 AS ASCIIZ * %MAX_PATH
    zString1 = "http://www.brianheibert.net/store.html"
    ShellExecute BYVAL %Null, "open", zString1,BYVAL,%Null, BYVAL %Null, %SW_ShowNormal

    and I get the following error message:
    Syntax Error
    Brian Heibert
    [email protected]
    http://www.heibertsoftware.com
    http://www.winvocalassist.com
    http://www.heibert.net

  • #2
    code not shown
    so line 277 means?????????????????????????
    Engineer's Motto: If it aint broke take it apart and fix it

    "If at 1st you don't succeed... call it version 1.0"

    "Half of Programming is coding"....."The other 90% is DEBUGGING"

    "Document my code????" .... "WHYYY??? do you think they call it CODE? "

    Comment


    • #3
      There is a comma between BYVAL and %NULL in the fourth parameter of the ShellExecute statement.

      Code:
      ShellExecute BYVAL %Null, "open", zString1,[B][COLOR="Red"]BYVAL,%Null[/COLOR][/B], BYVAL %Null, %SW_ShowNormal
      Regards,

      Pete.

      Comment


      • #4
        Brian -

        When you get a compile-time error, in almost every case, the compiler will display the line number and approximate column number of the error. This should point you right at the the extra comma noted earlier.

        Bob Zale
        PowerBASIC Inc.

        Comment

        Working...
        X