“Pascal Cheat Shheett” Code-Antworten

Pascal Cheat Shheett

var
  a: array[1..100] of integer;
DevLorenzo

Pascal Cheat Shheett

Function Func_Name(params...) : Return_Value;
Procedure Proc_Name(params...);
DevLorenzo

Pascal Cheat Shheett

function name(argument(s): type1; argument(s): type2; ...): function_type;
DevLorenzo

Pascal Cheat Shheett

type 
Books = record
   title: packed array [1..50] of char;
   author: packed array [1..50] of char;
   subject: packed array [1..100] of char;
   book_id: integer;
end;
DevLorenzo

Pascal Cheat Shheett

procedure name(argument(s): type1, argument(s): type 2, ... );
DevLorenzo

Pascal Cheat Shheett

procedure yell(s: string, n: integer);
  var
    i: integer;
  begin
    for i := 1 to n do
      writeln(s);
  end;
DevLorenzo

Pascal Cheat Shheett

VELOCITY_LIGHT = 3.0E=10;
PIE = 3.141592;
NAME = 'Stuart Little';
CHOICE = yes;
OPERATOR = '+';
DevLorenzo

Pascal Cheat Shheett

var
  a: array[1..100] of integer;
  sum: integer = 0;
…
for v in a do
  sum := sum + v;
DevLorenzo

Pascal Cheat Shheett

readln (a, b, c);
s := (a + b + c)/2.0;
area := sqrt(s * (s - a)*(s-b)*(s-c));
writeln(area);        
DevLorenzo

Pascal Cheat Shheett

Sr.No	Control Statement & Description
1	break statement
Terminates the loop or case statement and transfers execution to the statement immediately following the loop or case statement.

2	continue statement
Causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating.

3	goto statement
Transfers control to the labeled statement. Though it is not advised to use goto statement in your program.
DevLorenzo

Ähnliche Antworten wie “Pascal Cheat Shheett”

Fragen ähnlich wie “Pascal Cheat Shheett”

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen