Recognize_Range_String_in_LT_Function
Last Update: 8/11/2022
Many LabTalk functions, such as total(), cannot accept range string as argument. Suppose we have worksheet name and column index in Col(A) and col(B) respectively, we cannot use following formula to calculate the total of the ith column directly.
total(A$ + “!” + B$)
So from Origin 2023, we include a LabTalk local function mkrng to generate Range variable. For the above example, you can use following formula instead.
total(mkrng(A$ + “!” + B$))
For versions before Origin 2023, you will need to define following mkrng function by yourself.
function range mkrng(string str) { range rr = str$; return rr; }
Keywords:LabTalk, range, string