Evaluateis an alternative to the IF condition. To give multiple conditions, you need to use IF conditions. But using the Evaluatewith ALSO you can simplify the code. The Evaluate with ALSO equals the AND condition. Evaluate with ALSO With the Evaluate, you can test two or more conditions us...
Q:EVALUATE 语句有什么作用 A:EVALUATE 就象个 CASE 语句(多重开关语句,学过 C 的总知道吧),不同点在于 EVALUATE 不需要 BREAK,一旦匹配就跳出 EVALUATE 语句了 Q19) What are the different forms of EVALUATE statement? A19) EVALUATE EVALUATE SQLCODE ALSO FILE—STATUS WHEN A=B AND C=D WHEN 100 ...
首先得到A的结果,和WHEN语句的参数比较,如果和B相等,就执行B后的操作,执行完了不再执行后面的WHEN语句。如果不等就执行下一条WHEN语句。如果没有相等的就执行WHEN OTHER语句。 EVALUATE A ALSO B WHEN C ALSO D ... WHEN E ALSO F ... WHEN OTHER ... 对于有多个判断条件的,要多个条件同时满足。如上要...
Q18:EVALUATE 语句有什么作用 A18:EVALUATE 就象个 CASE 语句(多重开关语句,学过 C 的总明白吧),不同点在于 EVALUATE 不需要 BREAK,一旦匹配就跳出 EVALUATE 语句了 Q19) What are the different forms of EVALUATE statement? A19) EVALUATE EVALUATE SQLCODE ALSO FILE-STATUS WHEN A=B AND C=D WHEN 100 ...
WHEN "F" ALSO ANY ALSO C > 20 MOVE 25 TO Z WHEN OTHER MOVE 1 TO Z END-EVALUATE. (1)若A为“M”,B为20,C为20,则最终Z应为多少?01 (2)若A为“F”,B为35,Z为21,则最终Z应为多少?25 4、分析以下程序片段的输出:(5分) 数据部:01 IDX1 PIC 9(02). 过程部: PERFORM VARYING IDX1 ...
EVALUATE A ALSO B WHEN C ALSO D ... WHEN E ALSO F ... WHEN OTHER ... 对于有多个判断条件的,要多个条件同时满足。如上要C=A同时D=B,才执 行WHEN语句。 CONTINUE 继续执行下面的程序。 GO TO GO TO PROC1 [DEPENDING ON N] DEPENDING ON N将跳转到清单中的第N个 PROC. EXIT 一般为最后一句...
8、SO 32imperative stmt imperative stmtWHEN OTHER WHEN OTHERimperative stmt imperative stmtEND-EVALUATE END-EVALUATEEVALUATE SQLCODE ALSO A=B EVALUATE SQLCODE ALSO TRUEWHEN 100 ALSO TRUE WHEN 100 ALSO A=Bimperative stmt imperative stmtWHEN -305 ALSO FALSE WHEN -305 ALSO (A/C=4)imperative stmt ...
ALSO FALSE WHE -305 ALSO (A/C=4) imperative stmt imperative stmt END-EVALUATE END-EVALUATE Q20:怎么跳出一条EVALUATE语句 A20 :象18 题目说的那样,一旦匹配了某一个“WHE “语句就自动跳出了,不需要什么额 外的代码来跳出 Q21:在一个EVALUATE语句的某个WHE 分支中能否再插入复杂的情况(也就是嵌套) ...
COBOL语言程序设计 5.1基本输入输出语句 1.ACCEPT语句:直接从终端键盘或系统指定的输入设备上输入数据。ACCEPT标识符[FROM助忆名]注:A.标识符(identifier)指的是能唯一地标识一个数据项的数据名,不能唯一地标识一个数据项的数据名不是标识符。标识符可以是组合项。2013-10-28 COBOL语言程序设计 在ACCEPT语句中...
A19) EVALUATE EVALUATE SQLCODE ALSO FILE-STATUS WHEN A=B AND C=D WHEN 100 ALSO ‘00′ COBOL经典面试题库(中文) COBOL 经典面试题库 Q1:列举 COBOL 的 DEVISION A1:表记部,环境部,数据部,过程部 Q2:COBOL 有哪些可用的数据种类 A2:字符型(这里指的是包含字母和数字,字母型,数字型 Q3:INITIALIZE...