Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Enhanced basic+

OI 10

I have:

#pragma precomp SRP_PreCompiler
AllEditTables = "@.DWELLING_DETAILS_TABLE,@.SALE_DETAILS_TABLE,@.SALE_DATA_COMPARASONS_TABLE,@.RENTAL_DETAILS_TABLE,@.MARKETING_AGENT_TABLE"

For Each EditTableProp in AllEditTables using ','
NoOfCols=GetProperty(EditTableProp,"LIMIT")
For x = 1 To NoOfCols
send_event(EditTableProp,"CALCULATE",x)
Next x

next EditTableProp

I am getting VNAV on the 'for each ...' line

What am I doing wrong?

Comments

  • Not sure why a VNAV on that line, but I assume that beforehand you Swap '@' with @window in AllEditTables ?

    Also, shouldn't the next line be (note the underscore)
    NoOfCols=Get_Property(EditTableProp,"LIMIT")< 1>

    HTH, M@
  • >>but I assume that beforehand you....
    the 'GetProperty' does it

    >>shouldn't the next line be

    Yep, saw the <1> when looking at code.
    the getproperty is mine, so I can use @ and ,
  • Since this is OI10, I presume you are compiling in OI's editor instead of the SRP Editor. VNAV checking is done via BLINT, and the SRP Editor actually does a lot of work hiding BLINT's numerous false positives. Now that you are not in the SRP Editor, you have to live with BLINT in it's full glory.

    The For Each line becomes multiple lines, many of which are internal common variables. You can see the output of the precompiler by adding the following line after #pragma precomp SRP_PreCompiler:

    #pragma output TABLE KEY

    This outputs the precompiler results to a record for review. My guess is that BLINT is complaining about the following line that gets inserted in place of For Each:

    SRP_Precompiler_LoopStack@<-1> = SRP_Precompiler_LoopPos@:@VM:SRP_Precompiler_LoopLen@

    BLINT just looks for patterns, so the use of angle brackets on a variable before it's ever been set to "" falls into that criteria.
  • Ok, so basic+ can only be used with the SRP Editor(Contrary to advise I had been given)
    So then, I assume a lot of developers cant move to OI10 yet then.
    Therefore SRP HTTP Framework cant be used either.

    Any idea when SRP Editor will be available for OI10 (First time I have used basic+ so no problem for me)
  • Any idea when SRP Editor will be available for OI10
  • I need to clarify something with you. Are you seeing VNAV runtime errors or VNAV warnings?
  • I was just about to post this as I realised it would have nothing to do with SRP editor as it is happening in runtime.!!!???
  • To clarify something you referred to previously as "contrary to advise I had been given", I am rather certain that relates to a comment I had made suggesting that you only need the SRP Utilities to be installed in OI 10 in order to use the Enhanced BASIC+ syntax. I believe that is still true but that doesn't mean VNAV warnings won't occur in Revelation's editor (which is what Kevin was explaining above). VNAV warnings, however, do not prevent code compilation nor do they cause code to misbehave. I believe you jumped to unwarranted conclusions in your previous response.

    So, based on your "...as it is happening in runtime" post, does this mean you are experiencing a runtime error? Does the exact same code run just fine in OI 9?
  • To answer your question about when the SRP Editor will be available for OI 10, please read this post:
    https://forum.srpcs.com/discussion/comment/4038/#Comment_4038
  • I created this test in OI9 and OI10

    Subroutine test_basic_plus(Void) Declare Function GetProperty #pragma precomp SRP_PreCompiler AllEditTables = "@.DWELLING_DETAILS_TABLE,@.SALE_DETAILS_TABLE,@.SALE_DATA_COMPARASONS_TABLE,@.RENTAL_DETAILS_TABLE,@.MARKETING_AGENT_TABLE" debug For Each EditTableProp in AllEditTables using ',' NoOfCols=GetProperty(EditTableProp,"LIMIT")<1> For x = 1 To NoOfCols call send_event(EditTableProp,"CALCULATE",x) Next x next EditTableProp return

    It executed in both versions.

    This code as part of a subroutine gives the error, so I need to investigate further.

    Thanks for the help.

    RecalcAllEditTables: For Each EditTableProp in AllEditTables using ',' NoOfCols=GetProperty(EditTableProp,"LIMIT")<1> For x = 1 To NoOfCols send_event(EditTableProp,"CALCULATE",x) Next x next EditTableProp *Work=AllEditTables * Loop While Work * EditTableProp=Work[1,','] * Work[1,col2()]=null$ * NoOfCols=GetProperty(EditTableProp,"LIMIT")<1> * For x = 1 To NoOfCols * send_event(EditTableProp,"CALCULATE",x) * Next x * repeat return
  • I have given up. I have no idea of what is wrong. Will stick to the original (commented out) version, it works.
  • I just copied your code verbatim (other than GetProperty...I changed to this to Get_Property) and successfully compiled and ran it without any issue. Not sure what the problem is.
Sign In or Register to comment.