mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-12-06 03:51:35 +00:00
13 lines
250 B
Ada
13 lines
250 B
Ada
-- RUN: %llvmgcc -c %s -o /dev/null
|
|
function Switch (N : Integer) return Integer is
|
|
begin
|
|
case N is
|
|
when Integer'First .. -1 =>
|
|
return -1;
|
|
when 0 =>
|
|
return 0;
|
|
when others =>
|
|
return 1;
|
|
end case;
|
|
end;
|