Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

syntax explanation needed
There have been many threads that required a re-arrangement of the input
record.  The first proposal was '$1 = $1'

Followups pointed out the the line won't print if $1 = "" or $1 == 0, so
a fix to that was '{$1 = $1}1'

Now I can explain that, I said to myself; since } ends a line, the above
is equivalent to

'   {$1 = $1}
1'

The first action line rearranges the input line, the second expression
is always true, so now we print the rearranged line.

Kenny countered the solution of '{$1 = $1}1' with '($1 = $1)1'.  Now
that I'm not sure I understand.

What does 'expr expr expr' mean?
When is 'expr expr expr' the same as 'expr || expr || expr' ?

what does '($1 = $1)1' do? and why is it better than '{$1 = $1}1' ?

--
Regards,

---Robert

Report this thread to moderator Post Follow-up to this message
Old Post
Robert Katz
12-27-04 01:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

AWK archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:35 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.