Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
|
|
@ -1,4 +1,5 @@
|
|||
Show how to represent the boolean states "true" and "false" in a language. If other objects represent "true" or "false" in conditionals, note it.
|
||||
Show how to represent the boolean states "true" and "false" in a language.
|
||||
If other objects represent "true" or "false" in conditionals, note it.
|
||||
|
||||
;Cf.
|
||||
* [[Logical operations]]
|
||||
|
|
|
|||
|
|
@ -1,2 +1,4 @@
|
|||
---
|
||||
category:
|
||||
- Simple
|
||||
note: Basic language learning
|
||||
|
|
|
|||
6
Task/Boolean-values/Oberon-2/boolean-values.oberon-2
Normal file
6
Task/Boolean-values/Oberon-2/boolean-values.oberon-2
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
VAR
|
||||
a,b,c: BOOLEAN;
|
||||
...
|
||||
a := TRUE;
|
||||
b := FALSE;
|
||||
c := 1 > 2;
|
||||
3
Task/Boolean-values/PL-I/boolean-values-1.pli
Normal file
3
Task/Boolean-values/PL-I/boolean-values-1.pli
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Declare x bit(1);
|
||||
x='1'b; /* True */
|
||||
x='0'b; /* False */
|
||||
11
Task/Boolean-values/PL-I/boolean-values-2.pli
Normal file
11
Task/Boolean-values/PL-I/boolean-values-2.pli
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
*process source attributes xref macro or(!);
|
||||
tf: proc options(main);
|
||||
%Dcl true char; %true='''1''b';
|
||||
%Dcl false char; %false='''0''b';
|
||||
If true Then
|
||||
Put Skip list('That''s true');
|
||||
If false Then
|
||||
Put Skip List('ERROR');
|
||||
Else
|
||||
Put Skip List('false was recognized');
|
||||
End;
|
||||
|
|
@ -1 +0,0 @@
|
|||
true is '1'b and false is '0'b
|
||||
5
Task/Boolean-values/Vim-Script/boolean-values.vim
Normal file
5
Task/Boolean-values/Vim-Script/boolean-values.vim
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
if "foo"
|
||||
echo "true"
|
||||
else
|
||||
echo "false"
|
||||
endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue