Dan Nagle's Technical Site

Program aka

Home --> Fact Sheet --> Source Code --> aka

About the Program aka

Go directly to Downloads

The program aka converts among four byte types: integer, real, logical and character entities of length four. The conversions occur without changing the underying bit pattern. This program demonstrates one possible use of type boolean, as a hole in the type system. Results may differ between processors of different endian.

The program aka is modeled (loosely) on the Unix units program. aka is a conversational console program. When started, it prints a banner, and then asks "you have:". The user should respond with i, r, l, c, or b to enter a quantity to be interpreted as integer, real, logical or character*4, or to enter a hexadecimal bit pattern, respectively. Then aka asks "you want:". The user enters one of the preceeding codes to indicate the desired result type. Then enter the "have" quantity, and aka responds with the same underlying bits expressed as the "want" type.

This program may be extended to use other capabilities of type boolean, such as printing the number of bits set in each input, etc. As it stands, aka is mainly a debugging aid which helps answer questions of how a bit pattern could have been written in a memory location where it doesn't seem to belong.

Back to the Top

Downloads

To download a source code for the aka program, click aka. Note that you will need the standard_types module and the type_boolean module in order to compile the aka program.

For more information about the Portability Porject, click here.

For more information about the type_boolean module, click here.

Back to the Top

Please see our Fact Sheet, or E-mail me for more information.


Home - Fact Sheet - Free Source Code - Fortran Links - Email me

Back to the Top