Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
19
Task/Empty-string/Component-Pascal/empty-string.component
Normal file
19
Task/Empty-string/Component-Pascal/empty-string.component
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
MODULE EmptyString;
|
||||
IMPORT StdLog;
|
||||
|
||||
PROCEDURE Do*;
|
||||
VAR
|
||||
s: ARRAY 64 OF CHAR;
|
||||
(* s := "" <=> s[0] := 0X => s isEmpty*)
|
||||
BEGIN
|
||||
s := "";
|
||||
StdLog.String("Is 's' empty?:> ");StdLog.Bool(s = "");StdLog.Ln;
|
||||
StdLog.String("Is not 's' empty?:> ");StdLog.Bool(s # "");StdLog.Ln;
|
||||
StdLog.Ln;
|
||||
(* Or *)
|
||||
s := 0X;
|
||||
StdLog.String("Is 's' empty?:> ");StdLog.Bool(s = 0X);StdLog.Ln;
|
||||
StdLog.String("Is not 's' empty?:> ");StdLog.Bool(s # 0X);StdLog.Ln;
|
||||
StdLog.Ln;
|
||||
END Do;
|
||||
END EmptyString.
|
||||
Loading…
Add table
Add a link
Reference in a new issue