Question: Please answer questions 1 and 2 for the language construct in sub-part (b). Thanks! nnsvver uesions and 1. Give an example of the shortest CASE

Please answer questions 1 and 2 for the language construct in sub-part (b). Thanks!
nnsvver uesions and 1. Give an example of the shortest CASE statement in Modula-2. ("Shortest" means fewest number of lexemes.) 2. State whether or not each of the following language constructs is syntactically valid For each invalid construct, give the number of the syntax rule that is violated. (b) Declaration: PROCEDURE Sum (low, high: CARDINAL; f: Filter): CARDINAL; VAR i, sum CARDINAL; BEGIN sum :=0 FOR i := low TO high DO IF f (i) THEN sum sum+ i; END END; RETURN sum END Sum
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
