x2x

Functions

int main(int argc, char *argv[])

x2x [ option ] [ infile ]

  • +type char

    • data type

      • c char (1byte)

      • C unsigned char (1byte)

      • s short (2byte)

      • S unsigned short (2byte)

      • h int (3byte)

      • H unsigned int (3byte)

      • i int (4byte)

      • I unsigned int (4byte)

      • l long (8byte)

      • L unsigned long (8byte)

      • f float (4byte)

      • d double (8byte)

      • e long double (16byte)

      • a ascii

  • -r

    • rounding

  • -e int

    • warning type for out-of-range value

      • 0 no warning

      • 1 output index

      • 2 output index and exit immediately

  • -c int

    • number of columns

  • -f str

    • print format

  • infile str

    • double-type data sequence

  • stdout

    • double-type transformed data sequence

ramp -l 4 | x2x +da
# 0
# 1
# 2
# 3
ramp -l 4 | x2x +da -c 2
# 0       1
# 2       3
ramp -l 4 | sopr -a 0.5 | x2x +dc -r | x2x +ca -c 2
# 1       2
# 3       4
ramp -l 4 | x2x +da -c 2 -f %.1f
# 0.0     1.0
# 2.0     3.0
echo -1 1000 | x2x +aC -e 0 | x2x +Ca
# 0
# 255
Parameters:
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns:

0 on success, 1 on failure.

See also

dmp