Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
14
Task/Boolean-values/ArkScript/boolean-values.ark
Normal file
14
Task/Boolean-values/ArkScript/boolean-values.ark
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
(let test (fun (v) {
|
||||
(puts v ": ")
|
||||
(if v (print true) (print false)) }))
|
||||
|
||||
|
||||
(test 1)
|
||||
(test 0)
|
||||
(test true)
|
||||
(test false)
|
||||
(test "hello")
|
||||
(test "")
|
||||
(test [1 2 3])
|
||||
(test [])
|
||||
(test nil)
|
||||
8
Task/Boolean-values/Haxe/boolean-values.haxe
Normal file
8
Task/Boolean-values/Haxe/boolean-values.haxe
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
class Main {
|
||||
static public function main():Void {
|
||||
var t = true;
|
||||
var f = false;
|
||||
$type(t);
|
||||
$type(f);
|
||||
}
|
||||
}
|
||||
2
Task/Boolean-values/Prolog/boolean-values.pro
Normal file
2
Task/Boolean-values/Prolog/boolean-values.pro
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
?- ( Bool = true ; Bool = false ),
|
||||
( Bool -> bool_is_true ; bool_is_false ).
|
||||
15
Task/Boolean-values/Zig/boolean-values.zig
Normal file
15
Task/Boolean-values/Zig/boolean-values.zig
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub fn main() !void {
|
||||
const stdout = std.io.getStdOut().writer();
|
||||
|
||||
const bool1: bool = true;
|
||||
const bool2: bool = false;
|
||||
const bool3 = 2 + 2 == 4;
|
||||
const bool4 = 2 + 2 == 5;
|
||||
|
||||
try stdout.print("{any}\n", .{bool1});
|
||||
try stdout.print("{any}\n", .{bool2});
|
||||
try stdout.print("{any} {any}\n", .{@TypeOf(bool3), bool3});
|
||||
try stdout.print("{any} {any}\n", .{@TypeOf(bool4), bool4});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue