V_setRadix
FunctionDefine the radix for the whole-number read functions: C/C++ only!
Syntax C/C++#include <VIstd.h>
    (or <VSIstd.h>, <VLIstd.h>, <VUstd.h>, ... *)
void V_setRadix( int radix );
DescriptionBy default, the V.._read functions for the whole-number data types interpret all numbers as decimal numbers. V_setRadix allows to change this default behaviour.
The radix set by V_setRadix will be used in VI_read,   VI_nread and their VBI_,   VSI_,   VLI_,   VUB_,   VUS_,   VU_,   VUL_, and VUI_ analogues. It does, however, not affect VQI_read, VQI_nread, VUQ_read, or VUQ_nread (where the radix is always 10).

radix may take on values between 2 and 36 or 0.
In the case of radix=0, the basis of each number is determined at run-time:
All numbers beginning with the ciphers 1-9 are recognized as decimal numbers. All numbers beginning with "0x" are interpreted as hexadecimal and all numbers beginning with "0" without "x" are read as octal numbers.

Error handlingradix < 0, radix=1, or radix > 36 lead to a program abort with the error message "Invalid Parameter(s)".
Return valuenone
See alsoVI_read,   VI_nread,   strtol,   strtoul

VectorLib Table of Contents  OptiVec home