Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Determining the length of "long"?
- X-seq: zsh-users 19064
- From: Dominik Vogt <dominik.vogt@xxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Determining the length of "long"?
- Date: Thu, 11 Sep 2014 22:36:08 +0100
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Reply-to: dominik.vogt@xxxxxx
Is there a way to determine the length of the C type long from
inside a zsh script (without using external programs, of course).
As an alternative, is there a direct way to print out a "long"
integer value as binary bytes in host byte order?
I.e. given a value, say 0x12345, I need to print that as
\\x00\\x01\\x23\\x45
on a 32 bit platform, and as
\\x00\\x00\\x00\\x00\\x00\\x01\\x23\\x45
on a 64 bit platform (possibly in reverse byte order, depending on
the hardware).
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
Messages sorted by:
Reverse Date,
Date,
Thread,
Author