Results 1 to 6 of 6
  1. #1

    Brooklynguy's Avatar
    Member Since
    Oct 17, 2011
    Location
    Born in Brooklyn, bred in Manhattan, living in Vermont
    Posts
    111
    Specs:
    iMac Mid-2011 27: MPB Pro 2017 13 Touchbar Touch ID: iPad 5 2017:OS 10.13.4, iOS 11.3
    The use of (* *) and
    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 -- ?
    2007 Ford Mustang GT/CS black rag-top, 5 on-the-floor, 300-horses, 3-valve 4.6-liter V-8

  2. #2

    Raz0rEdge's Avatar
    Member Since
    Jul 17, 2009
    Location
    MA
    Posts
    10,445
    Specs:
    27" i7 iMac, 15" Macbook Pro TB, 13" Macbook Air, iPhone 6S, iPod Nano 7th Gen
    What's the context for this question?
    Mac-Forums is shutting down in the near future. Read this thread to learn more.

    --
    Regards
    ...Ashwin


  3. #3

    pigoo3's Avatar
    Member Since
    May 20, 2008
    Location
    U.S.
    Posts
    39,270
    Specs:
    2011 13" MBP 2.3ghz, 8gig ram, OS 10.8.5
    Are we talking (*,*) as an emoticon...or the super super super old MS-DOS search command *.*??

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

  4. #4

    Brooklynguy's Avatar
    Member Since
    Oct 17, 2011
    Location
    Born in Brooklyn, bred in Manhattan, living in Vermont
    Posts
    111
    Specs:
    iMac Mid-2011 27: MPB Pro 2017 13 Touchbar Touch ID: iPad 5 2017:OS 10.13.4, iOS 11.3
    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
    2007 Ford Mustang GT/CS black rag-top, 5 on-the-floor, 300-horses, 3-valve 4.6-liter V-8

  5. #5

    Raz0rEdge's Avatar
    Member Since
    Jul 17, 2009
    Location
    MA
    Posts
    10,445
    Specs:
    27" i7 iMac, 15" Macbook Pro TB, 13" Macbook Air, iPhone 6S, iPod Nano 7th Gen
    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..
    Mac-Forums is shutting down in the near future. Read this thread to learn more.

    --
    Regards
    ...Ashwin


  6. #6

    Brooklynguy's Avatar
    Member Since
    Oct 17, 2011
    Location
    Born in Brooklyn, bred in Manhattan, living in Vermont
    Posts
    111
    Specs:
    iMac Mid-2011 27: MPB Pro 2017 13 Touchbar Touch ID: iPad 5 2017:OS 10.13.4, iOS 11.3
    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 Attached Images
    2007 Ford Mustang GT/CS black rag-top, 5 on-the-floor, 300-horses, 3-valve 4.6-liter V-8

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •