025 string cmp

✓ Passing This code compiles and runs correctly.

Code

input.k

Actual

ant lt bee
cat eq cat
dog gt bee
app lt apple
apple gt app
 lt a
 eq 
Zebra lt apple

Expected output

ant lt bee
cat eq cat
dog gt bee
app lt apple
apple gt app
 lt a
 eq 
Zebra lt apple

Flows

subflow ~show click a branch to expand · @labels scroll to their anchor
cmp (a, b)
flow ~show click a branch to expand · @labels scroll to their anchor
show (a: "ant", b: "bee")
flow ~show click a branch to expand · @labels scroll to their anchor
show (a: "cat", b: "cat")
flow ~show click a branch to expand · @labels scroll to their anchor
show (a: "dog", b: "bee")
flow ~show click a branch to expand · @labels scroll to their anchor
show (a: "app", b: "apple")
flow ~show click a branch to expand · @labels scroll to their anchor
show (a: "apple", b: "app")
flow ~show click a branch to expand · @labels scroll to their anchor
show (a: "", b: "a")
flow ~show click a branch to expand · @labels scroll to their anchor
show (a: "", b: "")
flow ~show click a branch to expand · @labels scroll to their anchor
show (a: "Zebra", b: "apple")

Test Configuration

MUST_RUN LANGUAGES: zig cs