Host introspection: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎{{header|J}}: no need for cosmetics)
Line 4: Line 4:


=={{header|J}}==
=={{header|J}}==
;:^:_1 ":&.> (|: 32 64;"0 big`little) {"_1~ 2 2 #: 16b_e0 + a. i. 0 { 3!:1 <nowiki>''</nowiki>
":&> (|: 32 64 ;"0 big`little) {"_1~ 2 2 #: 16b_e0 + a. i. 0 { 3!:1 <nowiki>''</nowiki>
32 little
32
little

Revision as of 23:24, 10 October 2008

Task
Host introspection
You are encouraged to solve this task according to the task description, using any language you may know.

Print the word size and endianness of the host machine.

J

   ":&> (|: 32 64 ;"0 big`little) {"_1~ 2 2 #: 16b_e0 + a. i. 0 { 3!:1 ''  
32
little