Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Open Source > BOOK Beginning Linux Programming, 3rd Edition
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK Beginning Linux Programming, 3rd Edition
This is the forum to discuss the Wrox book Beginning Linux Programming, 2nd Edition by Richard Stones, Neil Matthew, Alan Cox; ISBN: 9780764543739
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK Beginning Linux Programming, 3rd Edition section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 12th, 2004, 10:49 PM
Registered User
 
Join Date: Sep 2004
Location: Brooklyn, NY, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 2: Use of :- in cd_db

The code ':-' appears in three different locations apparently unrelated to parameter expansion in the 'cd_db' CD project which concludes Chapter 2.

1. function: set_menu_choice()

    echo "Options :-"

2. function: update_cd()

    echo "Current tracks are :-"

3. function: list_tracks()

    echo "$cdtitle :-"

Since in these three locations ':-' does NOT occur in the context of parameter expansion (as discussed on p 71, e.g., ${param:-default}), I don't see what ':-' adds here ... except for confusion.

Jim Keenan


Just Another Perl Hacker
  #2 (permalink)  
Old August 25th, 2006, 12:11 PM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I believe they are being used as part of the text you should see.
for example the line
echo "Options :-" will echo all characters in quotes, so you will see

Options :-

it is just text, not a parameter expansion.

good day
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 2 - End of chapter exercises whizzkid1892 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 30th, 2008 01:02 PM
chapter 7 - chapter 11 pelopito BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 3 January 6th, 2008 11:40 AM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 10:40 PM



All times are GMT -4. The time now is 02:39 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.