totc(#LSEL) in notation?

Das Goravani goravanis at
Sun Oct 3 18:43:08 UTC 2021

I am wondering how to do

Set current list TheList
Calculate #1 as totc(#LSEL)

I looked everywhere and could not find anything on the SELECTED state of a line in a list

How do you ask via notation if a line is selected.. I’m used to #LSEL which relies on the current list

On another note:

Is there a way to use the FOR.. loop to go to selected lines only.. 

I know how to do it another way, which is fine ie

Do TheList.$first(1)
   Some code here
   Do TheList.$next(,1)
Until flag false

That’s how I go through selected lines in a list, is there a slicker way?

I don’t know why this works

For TheList.$line from 1 to TheList.$linecount step 1
End for

I don’t know how it knows that it should go to the line indicated by the counter, or how you all figured that out as it’s not in the online help.. maybe it’s in the manual

It seems that the first value.  TheList.$line.   Is just a counter.. a field that tells it how many iterations to perform

Then again from “from” and “to” argument tells it how many to undertake

But the online docs say the first value is only a counter.. not a pointer or more active agent

Somehow when you put TheList.$line it knows it’s a list, and it goes from line to line making the current line current

It baffles me a bit. But I’m happy to just use it. Thought I’d ask. 

More information about the omnisdev-en mailing list