Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2004
    Location
    Braceville, IL
    Posts
    27

    LUA and Continuation Lines

    Greetings,

    Does the scripting tool in SUF 7.0 allow you to have Continuation Lines for long command lines? I hate how laser printers just chop off the right hand end of a line and I prefer to see the entire command on the screen without scrolling anyway.

    Regards,
    Keith
    Keith Weatherhead
    Discus Data, Ltd
    keithw@ddltd.com

  2. #2
    Join Date
    Jun 2005
    Posts
    470
    instead of
    myCmd = "some long string";

    you may use

    myCmd = "some ";
    myCmd = myCmd .. "long ";
    myCmd = myCmd .. "string";

  3. #3
    Join Date
    Jan 2000
    Posts
    2,002
    or...

    Code:
    myCmd = [[some 
    long
    string]];

  4. #4
    Join Date
    Sep 2004
    Location
    Braceville, IL
    Posts
    27
    Quote Originally Posted by Brett View Post
    or...

    Code:
    myCmd = [[some 
    long
    string]];
    The previous answer was what I would consider as concatenation...
    are you saying that a single command line can span multiple physical lines if enclosed with "[[" and "]]" ?

    For example... Registry.SetValue ... Example 1 .. SUF 7.0 Help

    Where the following is really one long line...

    Registry.SetValue (HKEY_LOCAL_MACHINE, "Software\\My Application", "InstallPath", _ProgramFilesFolder .. "\\My Application", 1);


    could be coded as 2 physical lines via:

    [[ Registry.SetValue (HKEY_LOCAL_MACHINE, "Software\\My Application",
    "InstallPath", _ProgramFilesFolder .. "\\My Application", 1)]];


    Correct?

    Regards,
    Keith
    Last edited by kweatherhead; 10-25-2007 at 10:57 AM. Reason: typo error
    Keith Weatherhead
    Discus Data, Ltd
    keithw@ddltd.com

  5. #5
    Join Date
    Sep 2004
    Location
    Braceville, IL
    Posts
    27
    Quote Originally Posted by Brett View Post
    or...

    Code:
    myCmd = [[some 
    long
    string]];
    In addition, to clarify, if a return value is part of the command, would the format then be like this?

    is_there = [[Registry.DoesKeyExist (HKEY_LOCAL_MACHINE,
    "Software\\My Application")]];

    Regards,
    Keith
    Keith Weatherhead
    Discus Data, Ltd
    keithw@ddltd.com

  6. #6
    Join Date
    Jan 2000
    Posts
    2,002
    Sorry, I misunderstood your question. The [[...]] formatting if for strings only. If you are taking about breaking function calls onto separate lines, that is fine as long as you break them between arguments:

    Code:
    is_there = Registry.DoesKeyExist (HKEY_LOCAL_MACHINE, 
    "Software\\My Application");

  7. #7
    Join Date
    Sep 2004
    Location
    Braceville, IL
    Posts
    27
    Quote Originally Posted by Brett View Post
    Sorry, I misunderstood your question. The [[...]] formatting if for strings only. If you are taking about breaking function calls onto separate lines, that is fine as long as you break them between arguments:

    Code:
    is_there = Registry.DoesKeyExist (HKEY_LOCAL_MACHINE, 
    "Software\\My Application");
    Brett,

    Thanx for the clarification. Yes I was talking about functions and the likes, however, knowing the string option is nice, too !!

    Regards,
    Keith
    Keith Weatherhead
    Discus Data, Ltd
    keithw@ddltd.com

Posting Permissions

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