home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d5xx
/
d593
/
analyrim.lha
/
AnalyRim
/
AnalyRIM.zoo
/
GetSel2.Cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1992-01-05
|
3KB
|
207 lines
/#
//
VM
RM
ET *X*
CA P#0#0 G0
TE *U HERE
TE R=T
TE S=U-1.
TE P=T
TE Q=S
*C LOOP
*COOP
*CLOOP
L A0
VE
%Enter:(F10=Sel,text<Rtn>,arrows,F1=DoCmd,F2=EndCmdProc:%E" %\%
VM
TE B0=41743810560.
DF B0:C0 [F20.1]
L C0
EV *U STRVL A0,1;5
TE *U STRVL A0,1;5
TE C0=%
L E0
EV %=DABS(B0-C0)
TE DABS(B0-C0)\H=%
TE *F NOTUP
L P#_PQ
VE
CA G0 P#0#0
1
VM
TE *U HERE
TE P=T
TE Q=U-1.
CA P#0#0 G0
VE
DF P#0#0 ['>',F8.2]
VM
TE %=1.
TE *F LOOP
*COTUP
*C NOTUP
*CNOTUP
TE B0=41750102016.
TE %=DABS(B0-C0)
TE *F NOTLFT
L P#_PQ
VE
CA G0 P#0#0
3
VM
TE *U HERE
TE P=T
TE Q=U-1.
CA P#0#0 G0
VE
DF P#0#0 ['>',F8.2]
VM
TE %=1.
TE *F LOOP
*C NOTLFT
*COTLFT
*CNOTLFT
TE B0=41748004864.
TE %=DABS(B0-C0)
TE *F NOTRGT
L P#_PQ
VE
CA G0 P#0#0
4
VM
TE *U HERE
TE P=T
TE Q=U-1.
CA P#0#0 G0
VE
DF P#0#0 ['>',F8.2]
VM
TE %=1.
TE *F LOOP
*C NOTRGT
*COTRGT
*CNOTRGT
TE B0=41745907712.
TE %=DABS(B0-C0)
TE *F NOTDWN
L P#_PQ
VE
CA G0 P#0#0
2
VM
TE *U HERE
TE P=T
TE Q=U-1.
CA P#0#0 G0
VE
DF P#0#0 ['>',F8.2]
VM
TE %=1.
TE *F LOOP
*C NOTDWN
*COTDWN
*CNOTDWN
TE B0=41729097728.
TE %=DABS(B0-C0)
TE *F NOTSEL
*U HERE
L D0
TE U=U-1.
E _@T0,U0
L P#_RS
ED ~~__{D0~
ED /*X*//
TE %=((P-R)*(P-R)+(Q-S)*(Q-S))
TE *F LOOP
CA P#_RS G0
TE %=1.
TE *F LOOP
*C NOTSEL
*COTSEL
*CNOTSEL
TE B0=41712320512.
TE %=DABS(B0-C0)
TE *F NOTENT
L P#_RS
ED /*X*//
CA G0 P#_PQ
TE %=1.
TE *F DONE
*C NOTENT
*COTENT
*CNOTENT
TE B0=41710223360.
TE %=DABS(B0-C0)
TE *F NOTDO
VE
L P#_RS
%Enter command>%%\%
VM
TE %=1.
TE *F LOOP
*C NOTDO
*CNOTDO
*COTDO
*C Add check so <char>F10 can enter char AND select in one go.
L I0
EV *U STRVL A0,2;5
TE *U STRVL A0,2;5
TE I0=%
TE B0=41729097728.
TE %=DABS(B0-I0)
TE *F NOTXSEL
L I0
TE *U STRVL A0,1;1
TE I0=%
L A0
ET _#I0
L P#_RS
ED ~~__{A0~
ED /*X*//
TE %=((P-R)*(P-R)+(Q-S)*Q-S))
TE *F PROCSEL
CA P#_RS G0
*C PROCSEL
*U HERE
L D0
TE U=U-1.
E _@T0,U0
L P#_RS
ED ~~__{D0~
ED /*X*//
*C NOTXSEL
*C End check for <char>F10
L P#_RS
ED ~~__{A0~
VE
ED /*X*//
TE %=((P-R)*(P-R)+(Q-S)*(Q-S))
TE *F LOOP
CA P#_RS G0
TE %=1.
TE *F LOOP
*C Get by keys. This procedure is meant to be mapped to a
*C key in AnalytiCalc (VAX version) to allow "key mode"
*C range locations. You can enter arrow keys, which will have
*C the desired effect of moving you around the sheet, or
*C bits of formulas, which will be entered (you should
*C terminate these by RETURN), or select (VT200 keypad)
*C to enter the "current" cell name into the formula,
*C or ENTER (on auxiliary keypad key) to terminate the
*C formula and enter it.
*C The DO key allows any AnalytiCalc command to be entered.
*C On Amiga, the F2 key works as enter, F1 as DO, and F10 as
*C select. This version also allows a single character to
*C be entered with F10 after, to enter that character and THEN
*C the cell name pointed to. This is useful for second cellnames
*C of ranges or for adding the comma between ranges or cellnames.
*CDONE
*C DONE
*CONE
L P#_RS
V
RI
/#