Integer kiosk units. Prefer i32 here.
Goal
Log i32 units and an f64 price.
@external("env", "log")
declare function log(n: i32): void;
@external("env", "logStr")
declare function logStr(s: string): void;
export function main(): void {
let units: i32 = 12;
let price: f64 = 40.0;
log(units);
log(i32(price));
}@external("env", "log")
declare function log(n: i32): void;
@external("env", "logStr")
declare function logStr(s: string): void;
export function main(): void {
let n: i32 = 8;
log(n);
}@external("env", "log")
declare function log(n: i32): void;
@external("env", "logStr")
declare function logStr(s: string): void;
export function main(): void {
let x: f64 = 18.6;
log(i32(x));
}@external("env", "log")
declare function log(n: i32): void;
@external("env", "logStr")
declare function logStr(s: string): void;
export function main(): void {
log(i32(12 * 40));
}