You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current Control Basic TBL functionality has been promised for some time but it is unclear how it would work. If it is only for static value lookup it is of limited use. The function should be able to take a variable memory location to represent the head of the table and an offset into that table in order to retrieve values. This would save considerable amounts of code where repeated 'if' structures are currently required to select the appropriate value in a table. The following is how it is now required to use variable based tables.
10 if value = 0 then lookupValue = var10
20 if value = 1 then lookupValue = var11
30 if value = 2 then lookupValue = var12
40 if value = 3 then lookupValue = var13
50 if value = 4 then lookupValue = var14
when it would really make sense to have the following instead:
10 lookupValue = tbl( value, var10 )
Between the the small program sizes and the lack of table functionality, far more code must be written to handle something relatively simple and common in programs
The text was updated successfully, but these errors were encountered:
Please retain this issue as a feature request as as the current implementation references fixed values which solves a different problem. Allowing table/array like access to variable values would be very useful functionality.
The current Control Basic TBL functionality has been promised for some time but it is unclear how it would work. If it is only for static value lookup it is of limited use. The function should be able to take a variable memory location to represent the head of the table and an offset into that table in order to retrieve values. This would save considerable amounts of code where repeated 'if' structures are currently required to select the appropriate value in a table. The following is how it is now required to use variable based tables.
when it would really make sense to have the following instead:
Between the the small program sizes and the lack of table functionality, far more code must be written to handle something relatively simple and common in programs
The text was updated successfully, but these errors were encountered: