This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
lang28.txt
8683 lines (4559 loc) · 232 KB
/
lang28.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
clpackage.language:
Language package.
Note: To get help on a keyword enclose it in quotes. Keywords are starred.
intro - A brief introduction to IRAF
Language components:
break * Break out of a loop
case * One setting of a switch
commands - A discussion of the syntax of IRAF commands
cursors - Graphics and image display cursors
declarations - Parameter/variable declarations
default * The default clause of a switch
else * Else clause of IF statement
for * C-style for loop construct
if * If statement
goto * Goto statement
logging - Discussion of CL logging
next * Start next iteration of a loop
parameters - Discussion of parameter attributes
procedure * Start a procedure script
return * Return from script with an optional value
switch * Multiway branch construct
while * While loop
Builtin Commands and Functions:
access - Test if a file exists
back - Return to the previous directory (after a chdir)
beep - Send a beep to the terminal
bye - Exit a task or package
cache - Cache parameter files, or print the current cache list
cd - Change directory
chdir - Change directory
cl - Execute commands from the standard input
clbye - A cl followed by a bye (used to save file descriptors)
clear - Clear the terminal screen
defpac - Test if a package is defined
defpar - Test if a parameter is defined
deftask - Test if a task is defined
dparam - Dump a pset as a series of task.param=value assignments
edit - Edit a text file
ehistory - Edit history file to re-execute commands
envget - Get the string value of an environment variable
eparam - Edit parameters of a task
error - Print error code and message and abort
flprcache - Flush the process cache
fprint * Print a line into a parameter
fscan * Scan a list
gflush - Flush any buffered graphics output
hidetask - Make a task invisible to the user
history - Display commands previously executed
jobs - Display status of background jobs
keep - Make recent set, task, etc. declarations permanent
kill - Kill a background job
logout - Log out of the CL
lparam - List the parameters of a task
mathfcns - Mathematical routines
mktemp - Make a temporary (unique) file name
osfn - Return the host system equivalent of an IRAF filename
package - Define a new package, or print the current package names
prcache - Show process cache, or lock a process into the cache
print - Format and print a line on the standard output
putlog - Put a message to the logfile
radix - Encode a number in the specified radix
redefine - Redefine a task
reset - Reset the value of an environment variable
scan * Scan the standard input
service - Service a query from a background job
set - Set an environment variable
show - Show an environment variable
sleep - Hibernate for a specified time
strings - String manipulation routines
stty - Set/show terminal characteristics
task - Define a new task
time - Print the current time
unlearn - Restore the default parameters for a task or package
update - Update a task's parameters (flush to disk)
wait - Wait for all background jobs to complete
ACCESS (Feb86) language ACCESS (Feb86)
NAME
access -- test whether a file exists
USAGE
bool = access (filename)
PARAMETERS
filename
The name of the file whose existence is to be tested.
DESCRIPTION
ACCESS is a boolean intrinsic function returning true ("yes") if the
named file exists. ACCESS can only be called as a function in an
expression, not as a task.
EXAMPLES
1. Type a file if it exists.
if (access ("lib$motd"))
type ("lib$motd")
else
error (11, "File not found")
2. Tell if a file exists.
cl> = access ("lib$motd")
BUGS
An optional second argument should be added to test whether the
named file can be accessed for reading or writing.
-1-
BACK (Feb86) language BACK (Feb86)
NAME
back -- return to the previous directory
USAGE
back
PARAMETERS
None.
DESCRIPTION
BACK is used after a call to CHDIR or CD to return to the previous
directory. Repetitive calls to BACK may be used to toggle between
two directories.
EXAMPLES
1. Go to the logical directory "dataio".
cl> cd dataio
2. Return to the previous directory, and then go back to the dataio
directory.
cl> back;back
SEE ALSO
chdir, pathnames
-1-
BEEP (Feb86) language BEEP (Feb86)
NAME
beep -- beep the terminal
USAGE
beep
DESCRIPTION
Beep sends the bell character (^G) to the terminal.
EXAMPLES
1. Wait for a background job to complete, ringing the terminal bell
when done.
cl> wait;beep
SEE ALSO
clear
-1-
BREAK (Feb86) language BREAK (Feb86)
NAME
break -- break out of a loop
USAGE
break
DESCRIPTION
The BREAK statement is used to exit (break out of) the FOR or WHILE
loop in which it is found. In the case of nested loop constructs
only the innermost loop is terminated. Unlike C usage the BREAK
statement does not break out of a switch.
EXAMPLES
1. Scan a list (file), printing each list element until either the
list is exhausted or a list element "exit" or "quit" is encountered.
while (fscan (list, s1) != EOF) {
if (s1 == "exit" || s1 == "quit")
break
print (s1)
}
2. Sum the pixels in a two dimensional array, terminating the sum
for each line if a negative pixel is encountered, and terminating
the entire process when the total sum passes a predefined limit.
total = 0
for (i=1; i <= NCOLS; i+=1) {
for (j=1; j <= NLINES; j+=1) {
if (pixel[i,j] < 0)
break # exit the J loop
total += pixel[i,j]
}
if (total > NPHOT)
break # exit the I loop
}
BUGS
SEE ALSO
next, while, for
-1-
BYE (Feb86) language BYE (Feb86)
NAME
bye -- terminate task execution
USAGE
bye
DESCRIPTION
The BYE command terminates the task from which it is executed.
This is exactly equivalent to the CL reading end of file (EOF) when
executing a task.
EXAMPLES
1. The most common usage of BYE occurs when it is typed by the user
to exit a package; in this case, BYE terminates the package script
task.
cl> plot
pl> bye
cl>
SEE ALSO
clbye, return
-1-
CACHE (Feb86) language CACHE (Feb86)
NAME
cache -- cache the parameters for a task in fast memory
USAGE
cache task [task ...]
PARAMETERS
task
The name of a task whose parameter set is to be cached in fast
memory.
DESCRIPTION
The CACHE command loads the parameters of a task in memory. The CL
normally reads the parameters for a task from disk whenever the
task is executed. Cacheing the parameters for frequently executed
tasks can speed up execution significantly. This is particularly
important when the tasks are called from within a loop.
If the CACHE command is entered without any arguments a list of the
currently "cached" tasks is printed.
EXAMPLES
1. Cache the parameters for the tasks DIRECTORY and PAGE.
cl> cache dir page
2. Cache the parameters for the tasks called in a loop within the
body of a procedure script. Note the use of command mode in the
script.
begin
cache ("alpha", "beta")
for (i=1; i <= 10; i+=1) {
alpha (i)
beta (i)
}
end
BUGS
The parameter cache should not be confused with the process cache
associated with the PRCACHE and FLPRCACHE commands.
SEE ALSO
unlearn, update, lparam, eparam
-1-
CASE (Feb86) language CASE (Feb86)
NAME
switch -- switch case statement
SYNTAX
switch (expr) {
case val1 [, val1,...]:
statements
case val3 [, val3,...]:
statements
(etc.)
default:
statements
}
ELEMENTS
expr
An integer-valued expression tested before entry into the
switch block.
valN
Integer valued constants used to match expression.
statements
Simple or compound statements to be executed when the
appropriate case or default block is selected.
DESCRIPTION
The SWITCH statement provides a multiway branch capability. The
switch expression is evaluated and control branches to the matching
CASE block. If there is no match the DEFAULT block, if present,
receives control. If no DEFAULT block is present, the switch is
skipped.
Each CASE statement consists of a list of values defining the case,
and an executable statement (possibly compound) to be executed if
the case is selected by the switch. Execution will continue until
the next case is reached, at which time a branch out of the SWITCH
statement occurs. Note this difference from the C switch case,
where an explicit BREAK statement is required to exit a switch. If
a BREAK is used in a CL switch, it will act upon the loop statement
containing the switch, not the switch itself.
Note that both the switch expression and the case constants may be
integers, or single characters which are evaluated to their ASCII
equivalents.
The DEFAULT statement must be the last statement in the switch
block.
-1-
CASE (Feb86) language CASE (Feb86)
EXAMPLES
1. Multiple cases, no default case.
switch (opcode) {
case 1:
task1 (args)
case 2:
task2 (args)
case 5:
task5 (args)
}
2. Multiple values in a case.
switch (digit) {
case '1','2','3','4','5','6','7':
n = n * 8 + digit - '0'
default:
error (1, "invalid number")
}
BUGS
Only integer values are allowed (no strings). The case values must
be constants; ranges are not permitted.
SEE ALSO
if else, goto
-2-
CD (Feb86) language CD (Feb86)
NAME
chdir, cd -- change the current working directory
USAGE
chdir [newdir] or cd [newdir]
PARAMETERS
newdir
The new working directory. The special name "." refers to the
current directory; ".." refers to the next higher directory.
DESCRIPTION
CHDIR is used to change the current working directory. When called
without any arguments, CHDIR sets the default directory to "home$",
the users home directory. The new directory can be specified as an
IRAF logical name, as a sub-directory of the current directory, as
a path from either a logical directory or the current directory, or
as an operating system dependent name.
The names CHDIR and CD are synonyms. Note that the command BACK
may be called after a CHDIR to return to the previous directory
without typing its name.
EXAMPLES
1. Return to our home directory.
cl> cd
2. Go to the package logical directory "pkg$".
cl> chdir pkg
3. Go down one level to the directory "dataio", a subdirectory of
"pkg".
cl> cd dataio
4. From "dataio", go back up to "pkg" and down into "images".
cl> cd ../images
5. Go to the "tv" directory, a subdirectory of "images", regardless
of the current directory
cl> cd pkg$images/tv
6. On a VMS system, define a new logical directory on a different
-1-
CD (Feb86) language CD (Feb86)
disk device and go there. Note that the character $ is not
permitted in host file or directory names.
cl> set dd = scr1:[data]
cl> cd dd
SEE ALSO
back, pathnames
-2-
CHDIR (Feb86) language CHDIR (Feb86)
NAME
chdir, cd -- change the current working directory
USAGE
chdir [newdir] or cd [newdir]
PARAMETERS
newdir
The new working directory. The special name "." refers to the
current directory; ".." refers to the next higher directory.
DESCRIPTION
CHDIR is used to change the current working directory. When called
without any arguments, CHDIR sets the default directory to "home$",
the users home directory. The new directory can be specified as an
IRAF logical name, as a sub-directory of the current directory, as
a path from either a logical directory or the current directory, or
as an operating system dependent name.
The names CHDIR and CD are synonyms. Note that the command BACK
may be called after a CHDIR to return to the previous directory
without typing its name.
EXAMPLES
1. Return to our home directory.
cl> cd
2. Go to the package logical directory "pkg$".
cl> chdir pkg
3. Go down one level to the directory "dataio", a subdirectory of
"pkg".
cl> cd dataio
4. From "dataio", go back up to "pkg" and down into "images".
cl> cd ../images
5. Go to the "tv" directory, a subdirectory of "images", regardless
of the current directory
cl> cd pkg$images/tv
6. On a VMS system, define a new logical directory on a different
-1-
CHDIR (Feb86) language CHDIR (Feb86)
disk device and go there. Note that the character $ is not
permitted in host file or directory names.
cl> set dd = scr1:[data]
cl> cd dd
SEE ALSO
back, pathnames
-2-
CL (Jun86) language CL (Jun86)
NAME
cl -- call the CL as a task
clbye -- like cl(), but closes current script file too
PARAMETERS
gcur = ""
Global graphics cursor.
imcur = ""
Global image cursor.
abbreviate = yes
Permits minimum match abbreviations of task and parameter names
(disabled within scripts).
echo = no
Echo all commands received by the CL on the terminal.
ehinit = "standout eol noverify"
Ehistory options string. (See "ehistory")
epinit = "standout noshowall"
Eparam options string. (See "eparam")
keeplog = no
Keep a log of all CL commands.
logfile = "uparm$logfile"
The name of the logfile, if command logging is enabled.
logmode = "commands nobackground noerrors notrace"
Logging mode control parameter. (See "logging")
lexmodes = yes
Enable automatic mode switching between "command mode" (used
when commands are being entered interactively at the terminal),
and "compute mode" (used to evaluate arithmetic expressions and
argument lists). If LEXMODES is disabled command mode is
disabled. Command mode is always disabled within scripts and
within parenthesis, i.e., expressions or formal argument lists.
menus = yes
If MENUS are enabled, a table will be printed whenever a
package is entered or exited listing the tasks (or subpackages)
in the new package.
mode = "ql"
The parameter mode of the CL, and of any tasks run by the CL
which do not specify their own mode (i.e., which specify `auto'
mode). A "q" causes a query to be generated whenever a
-1-
CL (Jun86) language CL (Jun86)
parameter is used which was not set explicitly on the command
line. An "m" (menu mode) causes EPARAM to be called to
edit/check a task's parameters when the task is run
interactively. An "l" causes the parameter file for a task to
be updated on disk whenever the task is run interactively.
Note that changing the mode at the CL level will have no affect
on the operation of an individual task unless "auto" mode is set
at the package, task, and parameter level, causing the mode to
defer to the global CL mode.
notify = yes
If NOTIFY is enabled background jobs will print a message on
the user terminal (or in the logfile for a queued job)
notifying the user when the job completes.
szprcache = (a small number)
Controls the size of the process cache. The value may range
from 1 to 10. A larger number reduces process spawns but the
idle processes may consume critical system/job resources.
DESCRIPTION
The CL and CLBYE commands are used to call the CL as a task. The
function of the CL task is to read and execute commands from its
standard input until BYE or end of file is reached. The CL task
may be called with arguments or executed in the background like any
other task. The CL task may be called from within a procedure or
script to read commands from the command stream which called that
procedure or task; this is usually the terminal but may be a
another script.
When the CL or CLBYE command is invoked, the command language
interpreter stores information about which tasks and packages are
currently defined. When the command is finished any tasks or
packages which have become defined since invocation are lost,
unless the user specifically overrides this by using the KEEP
command.
The CLBYE command performs exactly like a CL followed by a BYE,
except that when called from a script the script file is closed
immediately, freeing its file descriptor for use elsewhere. If CL
is used instead of CLBYE in a script, the file is not closed until
after the CL returns. If a CLBYE is used in a script, any commands
following the CLBYE will not be executed.
EXAMPLES
1. Execute CL commands from a file.
cl> cl < cmdfile
2. Execute CL commands from a pipe.
-2-
CL (Jun86) language CL (Jun86)
cl> print ("!type ", fname) | cl
3. Execute CL, taking command input from the terminal. Since
command input is already from the terminal, the only effect is to
mark the state of CL memory, to allow TASK, SET, and other
definitions to be made temporarily and later freed by terminating
the CL with a BYE.
cl> cl
cl> set pak = "home$tasks/"
cl> task $mytask = pak$x_mytask.e
(execute the task)
cl> bye
In the example above, the declarations of the logical directory
"pak" and the task "mytask" are discarded when the BYE is entered,
terminating the CL.
BUGS
Beware that any changes made to the global CL parameters during the
execution of a CL remain in effect after the task terminates.
SEE ALSO
bye, keep, logout
-3-
CLBYE (Jun86) language CLBYE (Jun86)
NAME
cl -- call the CL as a task
clbye -- like cl(), but closes current script file too
PARAMETERS
gcur = ""
Global graphics cursor.
imcur = ""
Global image cursor.
abbreviate = yes
Permits minimum match abbreviations of task and parameter names
(disabled within scripts).
echo = no
Echo all commands received by the CL on the terminal.
ehinit = "standout eol noverify"
Ehistory options string. (See "ehistory")
epinit = "standout noshowall"
Eparam options string. (See "eparam")
keeplog = no
Keep a log of all CL commands.
logfile = "uparm$logfile"