aritmetics

This commit is contained in:
bQUARKz 2026-03-09 16:43:10 +00:00
parent f84705b67d
commit 5575c491a1
Signed by: bquarkz
SSH Key Fingerprint: SHA256:Z7dgqoglWwoK6j6u4QC87OveEq74WOhFN+gitsxtkf8
2 changed files with 36 additions and 2 deletions

View File

@ -0,0 +1,13 @@
package p.studio.compiler;
import p.studio.compiler.messages.BuilderPipelineConfig;
import p.studio.compiler.workspaces.BuilderPipelineService;
import p.studio.utilities.logs.LogAggregator;
public class Compile {
public static void main(String[] args) {
final var logAggregator = LogAggregator.stdout();
final var config = new BuilderPipelineConfig(false, "test-projects/main");
BuilderPipelineService.INSTANCE.run(config, logAggregator);
}
}

View File

@ -3,8 +3,29 @@ import { Input } from @sdk:input;
fn frame() -> void
{
let a = 10;
let b = 15;
let total = a + b;
if (Input.pad().a().pressed())
{
Log.debug("Hello World!");
total += 25;
}
}
else if (Input.pad().b().pressed())
{
total += 5;
}
if (total == 30)
{
Log.info("30 is the magic number!");
}
else if (total == 50)
{
Log.error("50 is the magic number!");
}
else
{
Log.warn("The magic number is neither 30 nor 50!");
}
}