Code Golf: Code Golf: Difference between revisions
Content added Content deleted
m (Qualify "all compilers") |
m (C of L syntax requires Ada 12) |
||
Line 25: | Line 25: | ||
with Ada.Text_IO;procedure C is L:array(1 .. 9)of Integer:=(67,111,100,101,32,71,111,108,102);begin for C of L loop Ada.Text_IO.Put(Character'Val(C));end loop;end; |
with Ada.Text_IO;procedure C is L:array(1 .. 9)of Integer:=(67,111,100,101,32,71,111,108,102);begin for C of L loop Ada.Text_IO.Put(Character'Val(C));end loop;end; |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
163 characters; this should be portable to all Ada compilers |
163 characters; this should be portable to all Ada-12 compilers and all platforms |
||
If we presume Linux, GNAT, and an executable name of "Code Golf", this can be shortened to (all one line): |
If we presume Linux, GNAT, and an executable name of "Code Golf", this can be shortened to (all one line): |