Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
23
Task/Boolean-values/Free-Pascal-Lazarus/boolean-values.pas
Normal file
23
Task/Boolean-values/Free-Pascal-Lazarus/boolean-values.pas
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{$mode objfpc}{$ifdef mswindows}{$apptype console}{$endif}
|
||||
const
|
||||
true = 'true';
|
||||
false = 'false';
|
||||
begin
|
||||
writeln(true);
|
||||
writeln(false);
|
||||
end.
|
||||
|
||||
[ EDIT ]
|
||||
|
||||
See https://wiki.freepascal.org/Boolean
|
||||
|
||||
While you can assign values to true and false, it has now nothing to do with the boolean values....
|
||||
Try with this function:
|
||||
|
||||
FUNCTION IsNatural ( CONST num: VARIANT ): BOOLEAN;
|
||||
|
||||
BEGIN
|
||||
|
||||
IsNatural := ( num > 0 );
|
||||
|
||||
END;
|
||||
Loading…
Add table
Add a link
Reference in a new issue