Mailinglist Archive: opensuse (1523 mails)
| < Previous | Next > |
Re: [opensuse] All you script writer's .......
- From: Per Jessen <per@xxxxxxxxxxxx>
- Date: Sun, 28 Mar 2010 09:45:33 +0200
- Message-id: <hon1et$74h$1@xxxxxxxxxxxxxxxx>
Duaine Hechler wrote:
Why? The character set is only importanbt at time of output?
Sure. For instance in C:
c2x/c2d - covered by printf()
d2c/x2c - atoi, sscanf
In bash, there is also a printf(), read() and severals other that will
help you achieve the same.
php and perl both have similar functions.
--
Per Jessen, Zürich (6.9°C)
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
Here is functions in REXX:
C2X(), C2D(), D2C() and X2C() will be effected by the character set of
your computer since they convert to or from characters.
Why? The character set is only importanbt at time of output?
Note that if
C2X() and C2D() get their first parameter as a binary or hexadecimal
literal, the result will be unaffected by the machine type.
Also note that the functions B2X(), X2B(), X2D() and D2X() are not
effected by the character set, since they do not use character
representation.
C2X = char to hex
C2D = char to decimal
plus in reverse
B2X = binary to hex
B2D = binary to decimal
plus in reverse
Are there any equals in any other language ?
Sure. For instance in C:
c2x/c2d - covered by printf()
d2c/x2c - atoi, sscanf
In bash, there is also a printf(), read() and severals other that will
help you achieve the same.
php and perl both have similar functions.
--
Per Jessen, Zürich (6.9°C)
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |