mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-28 01:01:53 +03:00
fix indents
This commit is contained in:
parent
cc33c68bea
commit
1707d43be0
@ -1,3 +1,3 @@
|
||||
function main() -> u32[3] {
|
||||
return [1u32; 3]
|
||||
return [1u32; 3]
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> u32[3] {
|
||||
return [1u32, 1u32, 1u32]
|
||||
return [1u32, 1u32, 1u32]
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(arr: u32[3]) -> u32[3] {
|
||||
return arr
|
||||
return arr
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
// Multidimensional array syntax in leo
|
||||
function main() -> u32[3][2] {
|
||||
const m = [[0u32, 0u32, 0u32], [0u32, 0u32, 0u32]]; // inline
|
||||
const m = [[0u32, 0u32, 0u32], [0u32, 0u32, 0u32]]; // inline
|
||||
|
||||
const m: u32[3][2] = [[0; 3]; 2]; // initializer
|
||||
const m: u32[3][2] = [[0; 3]; 2]; // initializer
|
||||
|
||||
return m
|
||||
return m
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
// `{from}..{to}` copies the elements of one array into another exclusively
|
||||
function main() -> u32[3] {
|
||||
let a = [1u32; 4];
|
||||
let a = [1u32; 4];
|
||||
|
||||
return a[0..3]
|
||||
return a[0..3]
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// A spread operator `...` copies the elements of one array into another
|
||||
function main() -> u32[3] {
|
||||
let a = [1u32, 1u32];
|
||||
let a = [1u32, 1u32];
|
||||
|
||||
return [1u32, ...a]
|
||||
return [1u32, ...a]
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
// !(true && (false || true))
|
||||
function main() -> bool {
|
||||
const a = true;
|
||||
const b = false || a;
|
||||
const c = !(true && b);
|
||||
const a = true;
|
||||
const b = false || a;
|
||||
const c = !(true && b);
|
||||
|
||||
return c
|
||||
return c
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> bool {
|
||||
return false
|
||||
return false
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> bool {
|
||||
return false && false
|
||||
return false && false
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> bool {
|
||||
return false || false
|
||||
return false || false
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(b: bool) -> bool{
|
||||
return b
|
||||
return b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> bool {
|
||||
return !false
|
||||
return !false
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> bool {
|
||||
return !true
|
||||
return !true
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> bool {
|
||||
return !1u32
|
||||
return !1u32
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> bool {
|
||||
return true
|
||||
return true
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> bool {
|
||||
return true && false
|
||||
return true && false
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> bool {
|
||||
return true && true
|
||||
return true && true
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> bool {
|
||||
return true && 1u32
|
||||
return true && 1u32
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> bool {
|
||||
return true || false
|
||||
return true || false
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> bool {
|
||||
return true || true
|
||||
return true || true
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> bool {
|
||||
return true || 1u32
|
||||
return true || 1u32
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
circuit Foo {
|
||||
x: u32
|
||||
x: u32
|
||||
}
|
||||
|
||||
function main() -> Foo {
|
||||
return Foo { x: 1u32 }
|
||||
return Foo { x: 1u32 }
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
circuit Foo {
|
||||
x: u32
|
||||
x: u32
|
||||
}
|
||||
|
||||
function main() {
|
||||
let c = Foo { y: 0u32 };
|
||||
let c = Foo { y: 0u32 };
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() {
|
||||
let c = Foo { };
|
||||
let c = Foo { };
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
circuit Foo {
|
||||
x: u32,
|
||||
x: u32,
|
||||
}
|
||||
|
||||
function main() -> u32 {
|
||||
let c = Foo { x: 1u32 };
|
||||
let c = Foo { x: 1u32 };
|
||||
|
||||
return c.x
|
||||
return c.x
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
circuit Foo {
|
||||
x: u32
|
||||
x: u32
|
||||
}
|
||||
|
||||
function main() -> u32 {
|
||||
let c = Foo { x: 1u32 };
|
||||
let c = Foo { x: 1u32 };
|
||||
|
||||
return c.y
|
||||
return c.y
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
circuit Foo {
|
||||
function echo(x: u32) -> u32 {
|
||||
return x
|
||||
}
|
||||
function echo(x: u32) -> u32 {
|
||||
return x
|
||||
}
|
||||
}
|
||||
|
||||
function main() -> u32 {
|
||||
let c = Foo { };
|
||||
return c.echo(1u32)
|
||||
let c = Foo { };
|
||||
return c.echo(1u32)
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
circuit Foo {
|
||||
function echo(x: u32) -> u32 {
|
||||
return x
|
||||
}
|
||||
function echo(x: u32) -> u32 {
|
||||
return x
|
||||
}
|
||||
}
|
||||
|
||||
function main() -> u32 {
|
||||
let c = Foo { };
|
||||
return c.echoed(1u32)
|
||||
let c = Foo { };
|
||||
return c.echoed(1u32)
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
circuit Foo {
|
||||
static function echo(x: u32) -> u32 {
|
||||
return x
|
||||
}
|
||||
static function echo(x: u32) -> u32 {
|
||||
return x
|
||||
}
|
||||
}
|
||||
|
||||
function main() -> u32 {
|
||||
let c = Foo { };
|
||||
return c.echo(1u32) // echo is a static function and must be accessed using `::`
|
||||
let c = Foo { };
|
||||
return c.echo(1u32) // echo is a static function and must be accessed using `::`
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
circuit Foo {
|
||||
static function echo(x: u32) -> u32 {
|
||||
return x
|
||||
}
|
||||
static function echo(x: u32) -> u32 {
|
||||
return x
|
||||
}
|
||||
}
|
||||
|
||||
function main() -> u32 {
|
||||
return Foo::echo(1u32)
|
||||
return Foo::echo(1u32)
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
circuit Foo {
|
||||
function echo(x: u32) -> u32 {
|
||||
return x
|
||||
}
|
||||
function echo(x: u32) -> u32 {
|
||||
return x
|
||||
}
|
||||
}
|
||||
|
||||
function main() -> u32 {
|
||||
return Foo::echo(1u32) // echo is a non-static function and must be accessed using `.`
|
||||
return Foo::echo(1u32) // echo is a non-static function and must be accessed using `.`
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
circuit Foo {
|
||||
static function echo(x: u32) -> u32 {
|
||||
return x
|
||||
}
|
||||
static function echo(x: u32) -> u32 {
|
||||
return x
|
||||
}
|
||||
}
|
||||
|
||||
function main() -> u32 {
|
||||
return Foo::echoed(1u32)
|
||||
return Foo::echoed(1u32)
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
circuit Foo {
|
||||
static function new() -> Self {
|
||||
return Self { }
|
||||
}
|
||||
static function new() -> Self {
|
||||
return Self { }
|
||||
}
|
||||
}
|
||||
|
||||
function main() -> Foo {
|
||||
return Foo::new()
|
||||
return Foo::new()
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: field, b: field) {
|
||||
assert_eq!(a, b);
|
||||
assert_eq!(a, b);
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: field, b: field) -> field {
|
||||
return a / b
|
||||
return a / b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: field, b: field) -> bool {
|
||||
return a == b
|
||||
return a == b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: field, b: field) -> bool {
|
||||
return a >= b
|
||||
return a >= b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: field, b: field) -> bool {
|
||||
return a > b
|
||||
return a > b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(f: field) -> field{
|
||||
return f
|
||||
return f
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: field, b: field) -> bool {
|
||||
return a <= b
|
||||
return a <= b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: field, b: field) -> bool {
|
||||
return a < b
|
||||
return a < b
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
use crate::{
|
||||
boolean::{output_expected_boolean, output_false, output_true},
|
||||
boolean::{output_expected_boolean, output_true},
|
||||
get_error,
|
||||
get_output,
|
||||
parse_program,
|
||||
|
@ -1,3 +1,3 @@
|
||||
function main(a: field, b: field) -> field {
|
||||
return a * b
|
||||
return a * b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> field {
|
||||
return 1field
|
||||
return 1field
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: field, b: field) -> field {
|
||||
return a - b
|
||||
return a - b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(b: bool, f1: field, f2: field) -> field {
|
||||
return if b ? f1 : f2
|
||||
return if b ? f1 : f2
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> field {
|
||||
return 0field
|
||||
return 0field
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
function empty() { }
|
||||
|
||||
function main() {
|
||||
empty();
|
||||
empty();
|
||||
}
|
@ -1,13 +1,13 @@
|
||||
function one() -> u32 {
|
||||
return 1u32
|
||||
return 1u32
|
||||
}
|
||||
|
||||
function main() -> u32 {
|
||||
let mut a = 0u32;
|
||||
let mut a = 0u32;
|
||||
|
||||
for i in 0..10 {
|
||||
a += one();
|
||||
}
|
||||
for i in 0..10 {
|
||||
a += one();
|
||||
}
|
||||
|
||||
return a
|
||||
return a
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
function tuple() -> (bool, bool) {
|
||||
return (true, false)
|
||||
return (true, false)
|
||||
}
|
||||
|
||||
function main() -> (bool, bool) {
|
||||
let (a, b) = tuple();
|
||||
return (a, b)
|
||||
let (a, b) = tuple();
|
||||
return (a, b)
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> (bool, bool) {
|
||||
return (true, false)
|
||||
return (true, false)
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
function one() -> bool {
|
||||
return true
|
||||
return true
|
||||
}
|
||||
|
||||
function main() -> bool {
|
||||
return one() && one()
|
||||
return one() && one()
|
||||
}
|
@ -1,13 +1,13 @@
|
||||
function iteration() -> u32 {
|
||||
let mut a = 0u32;
|
||||
let mut a = 0u32;
|
||||
|
||||
for i in 0..10 {
|
||||
a += 1;
|
||||
}
|
||||
for i in 0..10 {
|
||||
a += 1;
|
||||
}
|
||||
|
||||
return a
|
||||
return a
|
||||
}
|
||||
|
||||
function main() -> u32 {
|
||||
return iteration() + iteration()
|
||||
return iteration() + iteration()
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
function one() -> u32 {
|
||||
return 1u32
|
||||
return 1u32
|
||||
}
|
||||
|
||||
function main() -> u32 {
|
||||
return one()
|
||||
return one()
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
function foo() -> field {
|
||||
return myGlobal
|
||||
return myGlobal
|
||||
}
|
||||
|
||||
function main() -> field {
|
||||
const myGlobal = 42field;
|
||||
return foo()
|
||||
const myGlobal = 42field;
|
||||
return foo()
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() {
|
||||
my_function();
|
||||
my_function();
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
function main() -> group {
|
||||
const point_1 = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group;
|
||||
const point_2 = (1005842117974384149622370061042978581211342111653966059496918451529532134799, 79389132189982034519597104273449021362784864778548730890166152019533697186)group;
|
||||
const point_1 = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group;
|
||||
const point_2 = (1005842117974384149622370061042978581211342111653966059496918451529532134799, 79389132189982034519597104273449021362784864778548730890166152019533697186)group;
|
||||
|
||||
return point_1 + point_2
|
||||
return point_1 + point_2
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
function main() {
|
||||
const point_1 = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group;
|
||||
const point_2 = (1005842117974384149622370061042978581211342111653966059496918451529532134799, 79389132189982034519597104273449021362784864778548730890166152019533697186)group;
|
||||
const point_1 = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group;
|
||||
const point_2 = (1005842117974384149622370061042978581211342111653966059496918451529532134799, 79389132189982034519597104273449021362784864778548730890166152019533697186)group;
|
||||
|
||||
assert_eq!(point_1, point_2);
|
||||
assert_eq!(point_1, point_2);
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
function main() {
|
||||
const point_1 = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group;
|
||||
const point_2 = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group;
|
||||
const point_1 = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group;
|
||||
const point_2 = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group;
|
||||
|
||||
assert_eq!(point_1, point_2);
|
||||
assert_eq!(point_1, point_2);
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
function main() -> bool {
|
||||
const point_1 = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group;
|
||||
const point_2 = (1005842117974384149622370061042978581211342111653966059496918451529532134799, 79389132189982034519597104273449021362784864778548730890166152019533697186)group;
|
||||
const point_1 = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group;
|
||||
const point_2 = (1005842117974384149622370061042978581211342111653966059496918451529532134799, 79389132189982034519597104273449021362784864778548730890166152019533697186)group;
|
||||
|
||||
return point_1 == point_2
|
||||
return point_1 == point_2
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
function main() -> bool {
|
||||
const point_1 = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group;
|
||||
const point_2 = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group;
|
||||
const point_1 = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group;
|
||||
const point_2 = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group;
|
||||
|
||||
return point_1 == point_2
|
||||
return point_1 == point_2
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(g: group) -> group {
|
||||
return g
|
||||
return g
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
function main() -> group {
|
||||
const point_1 = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group;
|
||||
const point_2 = (1005842117974384149622370061042978581211342111653966059496918451529532134799, 79389132189982034519597104273449021362784864778548730890166152019533697186)group;
|
||||
const point_1 = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group;
|
||||
const point_2 = (1005842117974384149622370061042978581211342111653966059496918451529532134799, 79389132189982034519597104273449021362784864778548730890166152019533697186)group;
|
||||
|
||||
return point_1 - point_2
|
||||
return point_1 - point_2
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> group {
|
||||
return 0group
|
||||
return 0group
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
import test_import.foo as bar;
|
||||
|
||||
function main() -> u32 {
|
||||
return bar()
|
||||
return bar()
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
import test_import.foo;
|
||||
|
||||
function main() -> u32 {
|
||||
return foo()
|
||||
return foo()
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
import test_import.(
|
||||
Point,
|
||||
foo
|
||||
Point,
|
||||
foo
|
||||
);
|
||||
|
||||
function main() -> u32 {
|
||||
let p = Point { x: 1u32, y: 0u32 };
|
||||
return p.x
|
||||
let p = Point { x: 1u32, y: 0u32 };
|
||||
return p.x
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import test_import.*;
|
||||
|
||||
function main() -> u32 {
|
||||
let p = Point { x: 1u32, y: 0u32 };
|
||||
return foo()
|
||||
let p = Point { x: 1u32, y: 0u32 };
|
||||
return foo()
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(b: bool) -> bool {
|
||||
return b
|
||||
return b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: bool, b: bool) -> bool {
|
||||
return a || b
|
||||
return a || b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i128, b: i128) -> i128 {
|
||||
return a + b
|
||||
return a + b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i128, b: i128) {
|
||||
assert_eq!(a, b);
|
||||
assert_eq!(a, b);
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i128, b: i128) -> i128 {
|
||||
return a / b
|
||||
return a / b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i128, b: i128) -> bool {
|
||||
return a == b
|
||||
return a == b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i128, b: i128) -> bool {
|
||||
return a >= b
|
||||
return a >= b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i128, b: i128) -> bool {
|
||||
return a > b
|
||||
return a > b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(x: i128) -> i128 {
|
||||
return x
|
||||
return x
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i128, b: i128) -> bool {
|
||||
return a <= b
|
||||
return a <= b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i128, b: i128) -> bool {
|
||||
return a < b
|
||||
return a < b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> i128 {
|
||||
return 170141183460469231731687303715884105727
|
||||
return 170141183460469231731687303715884105727
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> i128 {
|
||||
return -170141183460469231731687303715884105728
|
||||
return -170141183460469231731687303715884105728
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i128, b: i128) -> i128 {
|
||||
return a * b
|
||||
return a * b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i128, b: i128) -> i128 {
|
||||
return a ** b
|
||||
return a ** b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i128, b: i128) -> i128 {
|
||||
return a - b
|
||||
return a - b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(b: bool, x: i128, y: i128) -> i128 {
|
||||
return if b ? x : y
|
||||
return if b ? x : y
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i16, b: i16) -> i16 {
|
||||
return a + b
|
||||
return a + b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i16, b: i16) {
|
||||
assert_eq!(a, b);
|
||||
assert_eq!(a, b);
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i16, b: i16) -> i16 {
|
||||
return a / b
|
||||
return a / b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i16, b: i16) -> bool {
|
||||
return a == b
|
||||
return a == b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i16, b: i16) -> bool {
|
||||
return a >= b
|
||||
return a >= b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i16, b: i16) -> bool {
|
||||
return a > b
|
||||
return a > b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(x: i16) -> i16 {
|
||||
return x
|
||||
return x
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i16, b: i16) -> bool {
|
||||
return a <= b
|
||||
return a <= b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i16, b: i16) -> bool {
|
||||
return a < b
|
||||
return a < b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> i16 {
|
||||
return 32767
|
||||
return 32767
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main() -> i16 {
|
||||
return -32768
|
||||
return -32768
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i16, b: i16) -> i16 {
|
||||
return a * b
|
||||
return a * b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i16, b: i16) -> i16 {
|
||||
return a ** b
|
||||
return a ** b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(a: i16, b: i16) -> i16 {
|
||||
return a - b
|
||||
return a - b
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
function main(b: bool, x: i16, y: i16) -> i16 {
|
||||
return if b ? x : y
|
||||
return if b ? x : y
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user