New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Apps and Games Discussion of applications and games available for Mac OS X.

The use of (* *) and


Post Reply New Thread Subscribe

 
Thread Tools
Brooklynguy

 
Brooklynguy's Avatar
 
Member Since: Oct 17, 2011
Location: Born in Brooklyn, bred in Manhattan, living in Vermont
Posts: 63
Brooklynguy is on a distinguished road
Mac Specs: iMac, 27, Mid 2011, 2.7GHz Intel Core i5, 4GB 1333MHz DDR3, AMD Radeon HD 6770M 512MB, OS X 10.9.2

Brooklynguy is offline
Et AL:

I haven't found this in using the web so far, so while I am still hunting this down, mayhaps someone could give me and quick explanation on the use of (*, *), and -- ?

iMac, 27-inch, Mid 2011, 2.7GHz Intel Core i5, 4GB 1333MHz DDR3, AMD Radeon HD 6770M 512MB, OS X 10.9.2 (13C64)
2007 Mustang GT/CS, black, 5-on-the-floor, ragtop
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,327
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
What's the context for this question?

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks
pigoo3

 
pigoo3's Avatar
 
Member Since: May 20, 2008
Location: U.S.
Posts: 25,796
pigoo3 has a reputation beyond reputepigoo3 has a reputation beyond reputepigoo3 has a reputation beyond reputepigoo3 has a reputation beyond reputepigoo3 has a reputation beyond reputepigoo3 has a reputation beyond reputepigoo3 has a reputation beyond reputepigoo3 has a reputation beyond reputepigoo3 has a reputation beyond reputepigoo3 has a reputation beyond reputepigoo3 has a reputation beyond repute
Mac Specs: 13" MB 2.4ghz, 2gig ram, OS 10.7.5

pigoo3 is offline
Are we talking (*,*) as an emoticon...or the super super super old MS-DOS search command *.*??

- Nick

- Computer slow, too many "beachballs", read this: Beachballs
- Computer seems slower than it used to? Read this for some speedup tips: Speedup
- Almost full hard drive? Some solutions. Out of Space
- Apple Battery Info. Battery
QUOTE Thanks
Brooklynguy

 
Brooklynguy's Avatar
 
Member Since: Oct 17, 2011
Location: Born in Brooklyn, bred in Manhattan, living in Vermont
Posts: 63
Brooklynguy is on a distinguished road
Mac Specs: iMac, 27, Mid 2011, 2.7GHz Intel Core i5, 4GB 1333MHz DDR3, AMD Radeon HD 6770M 512MB, OS X 10.9.2

Brooklynguy is offline
Quote:
Originally Posted by Raz0rEdge View Post
What's the context for this question?
oops ... sorry about that ... normally I'm way more aware of what I'm doing (::keeps telling myself:

Applescript ... just starting to use it .... I use 2 dashes for comments and line breaks, one for each line or break.

But I have seen in other's examples at times the use of (* followed by lines of text ending with *)

My only guess is that this is from another kind of programming language or script perhaps?

BG

iMac, 27-inch, Mid 2011, 2.7GHz Intel Core i5, 4GB 1333MHz DDR3, AMD Radeon HD 6770M 512MB, OS X 10.9.2 (13C64)
2007 Mustang GT/CS, black, 5-on-the-floor, ragtop
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,327
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
Ahh..context, such a wonderful thing..

Yes, the "--" is for single line comments that will end with the newline. the (* and *) convention can be used for multi-line comments..

See here for how that works..

Other languages use other conventions, but the theory is the same..

C++ uses "//" for a single line comment and uses C-style /* and */ for multi-line comments. A lot of scripting languages use # for a single line comment and don't support multi-line comments, so every line has to be prefixed with # and so on..

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks
Brooklynguy

 
Brooklynguy's Avatar
 
Member Since: Oct 17, 2011
Location: Born in Brooklyn, bred in Manhattan, living in Vermont
Posts: 63
Brooklynguy is on a distinguished road
Mac Specs: iMac, 27, Mid 2011, 2.7GHz Intel Core i5, 4GB 1333MHz DDR3, AMD Radeon HD 6770M 512MB, OS X 10.9.2

Brooklynguy is offline
Quote:
Originally Posted by Raz0rEdge View Post
Ahh..context, such a wonderful thing..

Yes, the "--" is for single line comments that will end with the newline. the (* and *) convention can be used for multi-line comments.

RazOrEdge: That's what I was guessing first.

But whether I had put the (* and *) on the same line as the first line and last line of text, or had put each of those on a separate line from the actual text I wanted there (see below) an error message showed up when compilng.

example 1:
(* App name: Dual Side-by-Side Finder Windows version 1.0
Written by Dave 'Brooklynguy" Leav
created 2013-09-16 version 1.0
last modified 2013-09-20 version 1.1
Function: Replaces all Finder windows with dual-windows side-by-side *)
--

example 2:
(*
App name: Dual Side-by-Side Finder Windows version 1.0
Written by Dave 'Brooklynguy" Leav
created 2013-09-16 version 1.0
last modified 2013-09-20 version 1.1
Function: Replaces all Finder windows with dual-windows side-by-side
*)
--
Attached Images
File Type: jpg syntax_error .jpg (5.9 KB, 15 views)

iMac, 27-inch, Mid 2011, 2.7GHz Intel Core i5, 4GB 1333MHz DDR3, AMD Radeon HD 6770M 512MB, OS X 10.9.2 (13C64)
2007 Mustang GT/CS, black, 5-on-the-floor, ragtop
QUOTE Thanks

Post Reply New Thread Subscribe


« Retrieve MobileMe Password | Mail client not putting newly created messages in outbox »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

All times are GMT -4. The time now is 01:53 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?