Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > Re: awka on Mac...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 8 Topic 2225 of 2241
Post > Topic >>

Re: awka on Mac OS X 10.4.11 [Intel]

by Janis <janis_papanagnou@[EMAIL PROTECTED] > Apr 23, 2008 at 05:48 AM

On 23 Apr., 13:42, Robert Peirce <b...@[EMAIL PROTECTED]
>
wrote:
> Has anybody got this to pass all the tests on OS X? =A0I have one test
> that fails.
>
> BEGIN {
> =A0 print b +=3D b +=3D 1
> =A0 print b
> =A0 b =3D 6
> =A0 print b +=3D b++
> =A0 print b
> =A0 print b +=3D ++b
> =A0 print b
>
> }
>
> produces
> 1
> 1
> 12
> 12
> 25
> 25
>
> instead of
> 2
> 2
> 13
> 13
> 28
> 28
>
> If you have run into this and figured out the problem, please share. =A0
> I'm not even sure where to start to look!

First, here are examples from a WinDOS environment using MKS awk
and xgawk respectively (the latter is basically gawk)...

$ awk -f awktest
1
1
12
12
25
25
$ xgawk -f awktest
2
2
13
13
28
28

You see that it's not depending on the (Intel) platform.

Second, I'd suggest generally try to avoid writing programs with
side effects. Instead serialize such constructs, if only to make
your intention clear.

Janis

>
> awka.sourceforge.net says the package has been successfully installed on
> OS X, so somebody has it running. =A0However, one user posted the same
> error on a MacBook Pro which suggests there is some difference between
> the PPC and Intel machines.
>
> --
> Robert B. Peirce, Venetia, PA =A0724-941-6883
> bob AT peirce-family.com [Mac]
> rbp AT cooksonpeirce.com [Office]




 8 Posts in Topic:
awka on Mac OS X 10.4.11 [Intel]
Robert Peirce <bob@[EM  2008-04-23 11:42:55 
Re: awka on Mac OS X 10.4.11 [Intel]
Janis <janis_papanagno  2008-04-23 05:48:55 
Re: awka on Mac OS X 10.4.11 [Intel]
Thomas Weidenfeller <n  2008-04-23 15:48:54 
Re: awka on Mac OS X 10.4.11 [Intel]
Robert Peirce <bob@[EM  2008-04-23 14:55:05 
Re: awka on Mac OS X 10.4.11 [Intel]
Janis Papanagnou <Jani  2008-04-23 17:29:46 
Re: awka on Mac OS X 10.4.11 [Intel]
Robert Peirce <bob@[EM  2008-04-24 12:46:46 
Re: awka on Mac OS X 10.4.11 [Intel]
Janis <janis_papanagno  2008-04-24 06:28:43 
Re: awka on Mac OS X 10.4.11 [Intel]
pk <pk@[EMAIL PROTECTE  2008-04-24 15:42:22 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 6:09:02 CDT 2008.