sguess.gml
来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 52 行
GML
52 行
.section GUESS Statement
.*
.mext begin
GUESS [: block-label]
.mext end
.np
The
.kw GUESS
statement is an extension to the FORTRAN 77 language.
The
.kw GUESS
statement marks the beginning of a block of statements for which
a certain assumption or hypothesis has been made.
This hypothesis may be tested using logical
.kw IF
statements in conjunction with
.kw QUIT
statements.
The
.kw ADMIT
statement may be used to mark the beginning of an alternate
hypothesis.
The
.kw END GUESS
statement is used to mark the end of a series of GUESS-ADMIT blocks.
.exam begin
CHARACTER CH
READ *, CH
GUESS
IF( CH .LT. 'a' )QUIT
IF( CH .GT. 'z' )QUIT
PRINT *, 'Lower case letter'
ADMIT
IF( CH .LT. 'A' )QUIT
IF( CH .GT. 'Z' )QUIT
PRINT *, 'Upper case letter'
ADMIT
IF( CH .LT. '0' )QUIT
IF( CH .GT. '9' )QUIT
PRINT *, 'Digit'
ADMIT
PRINT *, 'Special character'
END GUESS
END
.exam end
.np
An optional block label may be specified with the
.kw GUESS
statement.
.np
For more information, see the chapter entitled :HDREF refid='fstruct'..
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?