Results 1 to 3 of 3

Thread: Overprotective SB-Compiler

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Overprotective SB-Compiler

    Hi Friedrich,

    after updateing SB to V8.1 Build 4227, I can't compile some of my
    projects. The compiler says, that there are some undefined variables,
    but thats not true. Look at this small example:


    ------ Compiler output -------

    Your Project Name-5.sb8(28): error GEN1006: Reference to variable
    %[L]EICAR% has not been previously defined.

    ------------------------------

    ------ Script -------

    25) #set compiler variable [L] = "TEST"
    26) Set Variable %[L]LINE% to ""
    27) Set Variable %[L]TESTFILE% to ""
    28) Set Variable %[L]LINE% to FUNCTION:Get Line "1" from "%[L]TESTFILE%"

    ------------------------------

    Demo Script attached.

    Thanks for your help.
    Markus

  2. #2

    Default Re: Overprotective SB-Compiler

    Marcus,

    > after updateing SB to V8.1 Build 4227, I can't compile some of my
    > projects. The compiler says, that there are some undefined variables,
    > but thats not true. Look at this small example:

    Yes, the following fix is responsible for this behavior:

    ---
    FIX : [SB#3-11022] IDE: The "Handle Text File Operation..." script
    function did not check for undefined runtime and compiler
    variables.
    ---

    I agree. The compiler is overprotective and checks all specified variables.
    In your case, you have a "%[L]EICAR%" variable defined in Line 28
    ("Advanced" field). Because the "Get Line" option does not make use of this
    variable, it does not really make sense to do the variable check here.

    You have to remove that variable and then it compiles fine. I have already
    changed it in our latest internal source codes so the variable check is only
    performed for the "Find Line", "Insert Line" and "Replace Line" operations.

    BTW, there is a bug in the "Handle Text File Operation" dialog. If you
    switch the Operation, it does not directly display the previously defined
    related value in the "Advanced" field. We have to fix this for the next
    maintenance build.

    To remove the %[L]EICAR% variable in your demo project, you have to do the
    following:

    1. Switch Operation to "Find Line"
    2. Click "OK" button
    3. Re-open the dialog and remove the variable in the "Advanced" field
    4. Switch Operation back to "Get Line"

    Friedrich
    Attached Images Attached Images  

  3. #3

    Default Re: Overprotective SB-Compiler

    Thanks.

    Markus Zander

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •