Horje
pascal cheat sheett Code Example
pascal cheat sheett
type
days, age = integer;
yes, true = boolean;
name, city = string;
fees, expenses = real;
pascal cheat sheett
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;
pascal cheat sheett
readln (a, b, c);
s := (a + b + c)/2.0;
area := sqrt(s * (s - a)*(s-b)*(s-c));
writeln(area);        
pascal cheat sheett
VELOCITY_LIGHT = 3.0E=10;
PIE = 3.141592;
NAME = 'Stuart Little';
CHOICE = yes;
OPERATOR = '+';
pascal cheat sheett
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.
pascal cheat sheett
var
choice: boolean;
pascal cheat sheett
&	Binary AND Operator copies a bit to the result if it exists in both operands.	(A & B) will give 12, which is 0000 1100
|	Binary OR Operator copies a bit if it exists in either operand.	(A | B) will give 61, which is 0011 1101
!	Binary OR Operator copies a bit if it exists in either operand. Its same as | operator.	(A ! B) will give 61, which is 0011 1101
~	Binary Ones Complement Operator is unary and has the effect of 'flipping' bits.	(~A ) will give -61, which is 1100 0011 in 2's complement form due to a signed binary number.
<<	Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand.	A << 2 will give 240, which is 1111 0000
>>	Binary Right Shift Operator. The left operands value is moved right by the number of bits specified by the right operand.	A >> 2 will give 15, which is 0000 1111
pascal cheat sheett
var
   r1, r2, ... : record-name;
pascal cheat sheett
var
weekdays, holidays : days;
choice: yes;
student_name, emp_name : name;
capital: city;
cost: expenses;
pascal cheat sheett
var
  s: shape;

begin
  s.kind := rectangle;
  s.length := 5.0;
  s.height := 3.0;
  ...




33

Related
pascal data type declaration Code Example pascal data type declaration Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10