McIDAS User's Guide
Version 2017.1

[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]


LWCON

Reverses the byte order of 4-byte values in a file to convert its format from little-endian to big-endian or vice-versa.


Format

LWCON sfile dfile [keywords]


Parameters

sfile

source LW file to convert to the opposite format

dfile

destination LW file name; if sfile is little-endian format then LWCON creates dfile in big-endian format; if sfile is big-endian format then LWCON creates dfile in little-endian format


Keyword

FLIp=

ALL

byte flips all words in the file (default=does not flip words consisting entirely of ASCII text)


Remarks

Use LWCON to convert the format of a file to the opposite format (little-endian to big-endian, or big-endian to little-endian). The file must consist of 4-byte integers and/or character data. This program will fail if the file contains integers representing valid 4-byte ASCII characters.


Examples

Suppose you create a map file named PERUMAP on a little-endian workstation. To use it in McIDAS-X you must convert it to big-endian format. To do so, enter this command:

LWCON PERUMAP OUTLPERU FLIP=ALL

This entry converts the file PERUMAP, which is in little-endian format, to a big-endian format file named OUTLPERU that can be used in McIDAS-X.


[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]