sequence of lines

ASJ Botenga bv.wallewijn at planet.nl
Sun Jun 1 00:35:11 PDT 2008


.... putting the sequence you want on the clipboard (don¹t forget to make
that numerous). If you do not want to discontinue the procedure, give a
choice in a YesNo window beforehand, followed by an if else comparison, for
example:
Noyes "do you want a sequence of lines now"if clipboard()="Yes"getscrapok
"typ 1rst line dot last line"
selectwithin seq()>val(clipboard()[1,"."][1,-2])-1 and
seq()<val(clipboard()[".",-1][2,-1])+1 endif
or shortening the last sentence, making use of changes text-values:
selectwithin seq()„val(clipboard()[1,"."])and
seq()¾100*val(clipboard()[".",-1])endif

I am curious, however, if Panorama has a single feature for that task or
perhaps an overall better way of performing this ?

Allard Botenga

There is no single feature for this, unless you
want to count Formula Find/Select, which would
require you to enter a complete formula, rather
than just the line numbers.

The only improvement I would suggest would be to
eliminate the use of the clipboard. There is no
reason for a user to suspect that using this
procedure will change the contents of the
clipboard, and that can lead to unpleasant
surprises when he or she tries to paste something
that is no longer there.

Local Begin, End, Range
Alert 1014, "do you want a sequence of lines now"

If info("DialogTrigger")="Yes"
     getText "typ 1rst line dot last line", Range
     Begin = val(array(Range, 1, "."))
     End = val(array(Range, 2, "."))
     selectwithin seq() = Begin and seq() <= End
EndIf

This should also be a little more efficient
because the SelectWithin formula, which is
repeated for every record in the currently
selected set, isn't being asked to repeatedly
access the clipboard and convert its contents
from text to numeric.

If you are using Panorama V or later, you can use
AlertNoYes in place of Alert 1014. It's
essentially the same command, with a name that's
easier to remember.

The >= and <= operators are alternatives for „
and ¾ respectively. Their main advantage is that
everyone that reads this email will see the
correct characters when they see = and <=, but
many, perhaps most of them, will not see the
correct characters when they see „ and ¾.

Dave

Back after a few day¹s I see the solution you offered. I am impressed by the
way you managed to avoid to affect the general memory.
However, when the memory is in use at the point of introducing in a macro,
Œnoyes¹ Œgetscrap¹ or other windows that affect he memory, you could handle
as follows for the same task (m=clipboard(), a=text):

a=m+"€"+a noyes "do you want a sequence of lines now"
if m="Yes"getscrapok "typ 1rst line dot last line"a=a["€",-1][2,-1]
selectwithin seq()=>val(m[1,"."])and seq()¾val(m[".",²€²][2,-1])stop
else m=a[1,²€²][1,-2]a=a["€",-1][2,-1]endif
If you don¹t want to see the little hesitation as compared to your solution
with less intern calculations, start with HIDE.
In stead of € you can use other unique symbols, like "`","^","å","®"

You can solve many but not all choices offered during a running procedure
using variables, but I am afraid the (general) memory cannot always be
spared. Panorama, though it is an excellent programm, alas, has only one
memory (my calculator has allready 6). Therefore I found it usefull to
expand the memory by using a little trick with symbols.
There remains a question, however. Since I write a bit complicated financial
programms using panorama, during the running of these one is frequently
asked to make a choice, I am always looking for a shorter macro-text. It
should be very usefull if the word clipboard() could be changed in only the
lettre m, which is equally understandable. Might there be a possibility -
with a feature I could not detect and possibly missed - to have this
changement realised?
Other abbreviations might be ³down, up, first or last² i.s.o. adding
Œrecord¹

Allard



More information about the Qna mailing list