pascal cheat sheet for programmers
with variable do begin statement(s) end;
with variable do statement;
pascal cheat sheet for programmers
with variable do begin statement(s) end;
with variable do statement;
pascal cheat sheet for programmers
if condition then begin statement(s) end;
if condition then statement;
pascal cheat sheet for programmers
repeat statement(s) until condition;
pascal cheat sheet for programmers
while condition do begin statement(s) end;
while condition do statement;
pascal cheat sheet for programmers
program Addition;
// Link the SysUtils file for access to file handling routines
uses
SysUtils;
// Declare some variables
var
LIn, LOut: Text; // References to the input and output files
LVar1, LVar2: integer; // The two values that are to be added together
LResult: integer; // The result
begin
// Open the input file
Assign(LIn, 'addin.txt');
Reset(LIn);
// Read the input values
ReadLn(LIn, LVar1, LVar2);
// Open the output file
Assign(LOut, 'addout.txt');
ReWrite(LOut);
// Calculate the result
LResult:= LVar1 + LVar2;
// Write to output file
WriteLn(LOut, LResult);
// Cleanup
CloseFile(LIn);
CloseFile(LOut);
end.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us