• Keine Ergebnisse gefunden

.NOTE=message

Im Dokument C Volume 3 (Seite 111-117)

.NOTE=message.

P a r a m e t e r D e s c r i p t i o n

message Specifies a 1- to 40-character text string that appears on the screen and in your dayfile. You can use uppercase and lowercase characters in the string.

In the first format, any alphanumeric or special characters may be used except a period or right parenthesis (. or )). Special characters need not be enclosed in dollar signs ($).

In the second format, any characters may be used (including a period r o r r i g h t p a r e n t h e s i s ) , b u t s p e c i a l c h a r a c t e r s m u s t b e e n c l o s e d i n dollar signs.

This directive applies only if the procedure is executed in screen mode.

\ 6 0 4 5 9 6 8 0 K 4 - 3 1

.PAGE Directive

The .PAGE directive specifies the string that precedes the page number for procedure displays that require more than one screen.

Format:

.PAGE,text.

.PAGE=text.

Parameter t e x t

D e s c r i p t i o n

Specifies a 0- to 40-character text string. You can use uppercase and lowercase characters in the string. The default is:

Page

In the first format, any alphanumeric or special characters may be used except a period or right parenthesis (. or )). Special characters need not be enclosed in dollar signs ($).

In the second format, any characters may be used (including a period or right parenthesis), but special characters must be enclosed in d o l l a r s i g n s .

.PROMPT Directive

When a procedure is called in screen mode, the .PROMPT directive defines the last line of the screen, assuming no .HELP text is being shown. By default, this line tells the

procedure caller how to proceed. For menu procedures, the input field immediately follows this prompt. In line mode, this directive applies only to menu procedures, where the system produces a screen-like display.

Format:

.PROMPT,text.

.PROMPT** text.

Parameter t e x t

D e s c r i p t i o n

Specifies a 0- to 40-character text string that appears as the prompt on the screen. The text string can be a maximum of 40 lowercase (12-bit) characters, 80 uppercase (6-bit) characters, or any

combination of lowercase and uppercase characters that does not exceed 4 8 0 b i t s .

In the first format, any alphanumeric or special characters may be used except a period or right parenthesis (. or )). Special characters need not be enclosed in dollar signs ($).

In the second format, any characters may be used (including a period or right parenthesis), but special characters must be enclosed in d o l l a r s i g n s .

4-32 60459680 H

0ms.

0$m>.,

P a r a m e t e r D e s c r i p t i o n

If the text parameter is omitted, the system issues the following prompts:

Mode and

P r o c e d u r e F o r m a t P r o m p t Screen mode

I n t e r a c t i v e

p r o c e d u r e S p e c i f y v a l u e s a n d p r e s s N E X T w h e n r e a d y.

Menu procedure Select from the list above and press NEXT, Line mode

I n t e r a c t i v e

p r o c e d u r e ( N o t a p p l i c a b l e )

Menu procedure SELECT BY NUMBER OR TYPE Q TO QUIT.

EXPANSION CONTROL DIRECTIVES

The expansion control directives allow you to control certain aspects of procedure

expansion. These directives allow you to inhibit expansion of portions of a procedure, to change the inhibit and concatenation characters, and to skip portions of the procedure when writing lines to the procedure command record.

.CC Directive

The .CC directive specifies the character used to concatenate character strings during procedure expansion. The new concatenation character remains in effect until the procedure terminates or until you enter another .CC directive. The default concatenation character is the ASCII character __ or the CDC graphics character [♦• The .CC directive can be placed anywhere in the procedure.

Format:

.CC(n)

P a r a m e t e r D e s c r i p t i o n

n S p e c i fi e s t h e n e w c o n c a t e n a t i o n c h a r a c t e r .

.EXPAND Directive

The .EXPAND directive terminates or restores procedure expansion for subsequent lines of the procedure. The .EXPAND directive can be used anywhere in the procedure following the

f o r m a t t i n g a n d h e l p d i r e c t i v e s . Format:

EXPAND,option

6 0 4 5 9 6 8 0 K 4 - 3 3

P a r a m e t e r D e s c r i p t i o n

O N S p e c i fi e s t h a t s u b s e q u e n t l i n e s o f t h e p r o c e d u r e a r e e x p a n d e d n o r m a l l y. T h i s i s t h e d e f a u l t v a l u e .

O F F S p e c i fi e s t h a t n o p a r a m e t e r s u b s t i t u t i o n s o r d i r e c t i v e p r o c e s s i n g i s performed on subsequent lines. In other words, any subsequent commands or procedure directives are written to the command record just as they appear in the procedure file.

.IC Directive

The .IC directive specifies the character used to inhibit parameter substitution or directive processing during procedure expansion. The new inhibit character remains in

e f f e c t u n t i l t h e p r o c e d u r e t e r m i n a t e s o r u n t i l y o u e n t e r a n o t h e r . I C d i r e c t i v e . T h e d e f a u l t r ^ ^ i n h i b i t c h a r a c t e r i s t h e A S C I I c h a r a c t e r / / o r t h e C D C g r a p h i c s c h a r a c t e r ^ > T h e . I C ; directive can be placed anywhere in the procedure.

Format:

. IC( n)

P a r a m e t e r D e s c r i p t i o n

Specifies the new inhibit character.

.SET Directive

The .SET directive allows you to build new parameters using strings and substrings created by the STR, STRB, and STRD functions and concatenation operations, which are described in section 6.

Format:

. S E T, k e y w d i = s t r e x p i , . . . , k e y w d n = s t r e x p n .

P a r a m e t e r D e s c r i p t i o n

k e y w d ^ D e fi n e s a n e w k e y w o r d o r r e f e r e n c e s a n e x i s t i n g k e y w o r d , e i t h e r f r o m the .PROC header or from an earlier .SET directive, keywd^ can be substituted in subsequent statements as if it were a formal parameter in the .PROC header.

If keywdi is an existing keyword, it is prefixed with an inhibit character to avoid unwanted substitution of the existing value.

If keywdi is enclosed in dollar signs, values substituted for keywdi in subsequent statements remain in or are converted to the literal format (by appending prefixing and suffixing dollar signs and replicating any dollar signs that occur within the values).

s tr e x p ^ M a y b e a n y v a l i d C C L e x p r e s s i o n , u s u a l l y b u t n o t n e c e s s a r i l y a n e x p r e s s i o n t h a t p r o d u c e s a s t r i n g r e s u l t . I f t h e r e s u l t o f s t r e x p ^

i s n o t a s t r i n g b u t a v a l u e , t h e v a l u e i s l e f t - j u s t i fi e d a n d , ^ . c o n s i d e r e d a s t r i n g . T h e r e s u l t i n g s t r i n g i n e i t h e r c a s e i s 1 substituted for any occurrences of keywd^ in subsequent statements

of the procedure.

4 - 3 4 6 0 4 5 9 6 8 0 K

0^S

Example 1:

.PR0C,CATTER*I,P1=(*A),P2=(*S3/D).

.SET,K9=STR($P1$,1,4)//STRD(P2,-1) . .IF,$K9$.EQ.$G00D1$,G0.

NOTE./THE 1ST 4 CHAR OF P1 AND THE LAST OF P2 = K9.

.ELSE,GO.

REVERT,EX.DISPLAY,STR($SORRY, K9 IS NOT GOOD1S).

.ENDIF,GO.

In this example, two substrings were concatenated to produce one string in the .SET expression. Every occurrence of keyword K9 in the lines following the .SET directive is replaced by the string resulting from the concatenation of substrings Pl and P2. If GOODY and 101 were supplied as values for Pl and P2, the value of K9 would be set to G00D1. (For a detailed explanation of how the STR and STRD functions operate, refer to section 6.) The subsequent .IF statement would be true, causing the NOTE command to be included and

executed. If BADNEWS were substituted for Pl, the .IF statement would be false, resulting in the execution of the REVERT command and then the DISPLAY command.

Example 2:

.PR0C,VALUES*I,P1=(*S/D),P2=(*S/D).

.SET,V1=STRD(P1+P2),V2=STRD(P1*P2),V3=STRD(P1**P2).

.IF,V1=V2=V3.NOTE./SUM, PRODUCT AND POWER ARE EQUAL.

NOTE./THE SUM OF P1 AND P2 IS V1.

NOTE./THE PRODUCT OF P1 AND P2 IS V2.

N0TE./P1 TO THE POWER OF P2 IS V3.

As this example demonstrates, the .SET directive along with the STRD function can create new keywords that make it possible to include arithmetic values as strings in subsequent

commands and directives.

Example 3:

.PR0C,LITKW*I,P1=(*A),$P2$=(*A).

NOTE./ #P1(P1) #P2(P2) #P3(P3) #P4(P4) .SET,P3=$GHI$,$P4$=$JKL$.

NOTE./ #P1(P1) #P2(P2) #P3(P3) #P4(P4) .SET,$#P1$=$P1$,#P2=P2,$#P3$=$P3$,#P4=P4.

NOTE./ #P1(P1) #P2(P2) #P3(P3) #P4(P4) REVERT. LITKW COMPLETED.

Execution of procedure LITKW using a BEGIN command produces:

07.16.51.BEGIN,,LITKW,ABC,DEF.

07.16.52.NOTE./ P1(ABC) P2($DEF$) P3(P3) P4(P4) 07.16.52.NOTE./ P1(ABC) P2($DEF$) P3(GHI) P4($JKL$) 07.16.52.NOTE./ P1($ABC$) P2(DEF) P3($GHI$) P4(JKL) 07.16.52.REVERT. LITKW COMPLETED.

T h i s e x a m p l e i l l u s t r a t e s t h e c r e a t i o n o f k e y w o r d s n o t p r e v i o u s l y d e fi n e d , r e d e fi n i t i o n o f existing keywords, and changing the literal keyword characteristics of existing keywords.

FILE DIRECTIVES

r T h e fi l e d i r e c t i v e s e i t h e r c r e a t e l o c a l fi l e s d u r i n g p r o c e d u r e e x p a n s i o n t i m e o r p l a c e fi l emarks in the procedure command record.

0$ms

V 6 0 4 5 9 6 8 0 K 4 - 3 4 . 1

.DATA Directive

A .DATA directive in a procedure marks the beginning of a sequence of data lines to be written to a separate file when the procedure is called. The data file can contain program source code, other NOS procedures, or any other type of data.

Format:

. D ATA , l f n .

P a r a m e t e r D e s c r i p t i o n

l f n S p e c i fi e s t h e n a m e o f t h e fi l e o n w h i c h t h e d a t a l i n e s a r e t o b e w r i t t e n . I f a fi l e n a m e d l f n i s a l r e a d y a s s i g n e d t o t h e j o b , i t i s returned, and new local file lfn is created. You cannot specify INPUT f o r l f n . I f l f n i s n o t s p e c i fi e d , t h e . D ATA fi l e c a n b e r e f e r e n c e d i n the procedure header using the special symbol //DATA.

The default for lfn depends on the nesting level of the procedure. At the first procedure level, the system calls this file ZZCCLAA; at the second procedure level, it is ZZCCLAB; and so on.

You can use the .IF, .ELSE, and .ENDIF directives within the data lines following the .DATA d i r e c t i v e t o c o n d i t i o n a l l y i n c l u d e l i n e s i n t h e d a t a fi l e .

File marks generated by .EOR and .EOF directives can subdivide the lines written to the data file into records or files. The sequence of data lines is terminated by one of the

f o l l o w i n g :

• A n o t h e r . D ATA d i r e c t i v e .

• An end-of-record (not an .EOR directive) in the procedure file.

• A n e n d - o f - f i l e ( n o t a n . E O F d i r e c t i v e ) i n t h e p r o c e d u r e f i l e .

• A n e n d - o f - i n f o r m a t i o n i n t h e p r o c e d u r e f i l e .

The data file created does not include the .DATA directive. Keyword substitution continues within the data file unless you insert a .EXPAND directive to suspend expansion processing.

A f t e r t h e d a t a fi l e i s w r i t t e n , i t i s r e w o u n d .

4- 3 4 .2 60459680 K

/g^s,

The following examples show three different ways of inserting a FORTRAN 5 program into a

Im Dokument C Volume 3 (Seite 111-117)