Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.unix.shell > #22497
| From | Spiros Bousbouras <spibou@gmail.com> |
|---|---|
| Newsgroups | comp.unix.shell |
| Subject | Re: [ANN] KornShell 93u+m 1.0.0-beta.2 |
| Date | 2021-12-17 12:50 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <JGDDG6C28aBHRfrQ6@bongo-ra.co> (permalink) |
| References | <j22f1cFh5m2U1@mid.individual.net> <sphijs$ejq$1@dont-email.me> <j236fkFldviU1@mid.individual.net> |
On Fri, 17 Dec 2021 11:18:26 +0100
Martijn Dekker <martijn@inlv.demon.nl> wrote:
> What the announcement item above means instead is this:
>
> $ myfunc() { return 12345; }
> $ myfunc; echo $?
> 12345
> $ (myfunc); echo $?
> 57
> $ ksh -c 'myfunc() { return 12345; }; myfunc'; echo $?
> 57
>
> i.e., the exit status of a subshell or child shell that invokes
> 'myfunc', and does nothing to overwrite $? before exiting, is the least
> significant 8 bits of 12345, i.e., 12345 % 0xFF == 210.
For the least significant 8 bits of 12345 the calculation you want is
12345 % 256 == 57 .Regardless , 12345 % 0xFF == 105 .
Back to comp.unix.shell | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[ANN] KornShell 93u+m 1.0.0-beta.2 Martijn Dekker <martijn@inlv.demon.nl> - 2021-12-17 04:38 +0100
Re: [ANN] KornShell 93u+m 1.0.0-beta.2 Janis Papanagnou <janis_papanagnou@hotmail.com> - 2021-12-17 09:43 +0100
Re: [ANN] KornShell 93u+m 1.0.0-beta.2 Martijn Dekker <martijn@inlv.demon.nl> - 2021-12-17 11:18 +0100
Re: [ANN] KornShell 93u+m 1.0.0-beta.2 Spiros Bousbouras <spibou@gmail.com> - 2021-12-17 12:50 +0000
Arithmetic trivia (Was: [ANN] KornShell 93u+m 1.0.0-beta.2) gazelle@shell.xmission.com (Kenny McCormack) - 2021-12-17 13:10 +0000
Re: Arithmetic trivia (Was: [ANN] KornShell 93u+m 1.0.0-beta.2) Janis Papanagnou <janis_papanagnou@hotmail.com> - 2021-12-17 21:39 +0100
Re: [ANN] KornShell 93u+m 1.0.0-beta.2 Martijn Dekker <martijn@inlv.demon.nl> - 2021-12-17 19:58 +0000
Re: [ANN] KornShell 93u+m 1.0.0-beta.2 Janis Papanagnou <janis_papanagnou@hotmail.com> - 2021-12-18 15:07 +0100
Re: [ANN] KornShell 93u+m 1.0.0-beta.2 Martijn Dekker <martijn@inlv.demon.nl> - 2021-12-19 21:00 +0000
Re: [ANN] KornShell 93u+m 1.0.0-beta.2 Martijn Dekker <martijn@inlv.demon.nl> - 2021-12-21 19:12 +0000
Re: [ANN] KornShell 93u+m 1.0.0-beta.2 Janis Papanagnou <janis_papanagnou@hotmail.com> - 2021-12-24 14:46 +0100
csiph-web