Host introspection: Difference between revisions

From Rosetta Code
Content added Content deleted
(New page: {{task}} Print the wp:ord_size#Word_size_choice and byte order of the host machine. For example, =={{header|J}}==)
 
(Print the word size and endianness of the host machine.)
Line 1: Line 1:
{{task}}
{{task}}


Print the [[wp:ord_size#Word_size_choice]] and byte order of the host machine. For example,
Print the [[wp:Word_size#Word_size_choice|word size]] and [[wp:Endianness|endianness]] of the host machine.


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

Revision as of 22:45, 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

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