-
writeln("Result: ", result); // Result: 15 // p****ing a
delegate literal result = reduce!((a, b) => (b <= pivot) ? a + b : a)(chain(a1, a2));
writeln("Result:...
-
stdio :
writeln;
alias twice = (f) => (int x) => f(f(x));
alias plusThree = (int i) => i + 3; void main() { auto g = twice(plusThree);
writeln(g(7)); //...
- ───────────────────────
begin // Note the
different data types.
writeLn(f(3));
writeLn(f(3.0)); end.
Delphi permits default parameters. In Pascal, if the...
- T****oWorld =
object procedure Put; end;
procedure T****oWorld.Put;
begin WriteLn('****o, World!'); end; var ****oWorld: T****oWorld; {
allocated on the...
- file-executable? (directory-files dir #t)))) (define (
writeln x) (display x) (newline)) (for-each
writeln (append-map
executables ((infix-splitter ":") (getenv...
-
following Pascal code
writes the two
words on
sequential lines:
writeln('Foo'); write('Bar');
writeln outputs a
newline after the
parameter text,
while write...
- commands.
while a <> b do
WriteLn('Waiting'); if a > b then
WriteLn('Condition met') {no
semicolon allowed before else} else
WriteLn('Condition not met');...
- 'Example.dll'; // main
program var R: Double;
begin R := AddNumbers(1, 2);
Writeln('The
result was: ', R); end. C 'Example.lib' file must be
included (****uming...
- T****oWorld =
class procedure Put; end;
procedure T****oWorld.Put;
begin Writeln('****o, World!'); end; var ****oWorld: T****oWorld; { this is an implicit...
- Pascal: Ada: if a > 0 then
writeln("yes") else
writeln("no"); if a > 0 then Put_Line("yes"); else Put_Line("no"); end if; C: S**** script: if (a > 0)...