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?
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
Swap
'@'
with
@window
in
AllEditTables
Also, shouldn't the next line be (note the underscore)
NoOfCols=Get_Property(EditTableProp,
"LIMIT"
)<
1
>
HTH, M@
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 ,
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.
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)
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?
https://forum.srpcs.com/discussion/comment/4038/#Comment_4038
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