AutoHotkey Community

It is currently May 26th, 2012, 1:54 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3

Which line splitting behavior do you expect to use most often?
Spaces and tabs at the beginning of each line should be omitted by default.
Spaces and tabs at the beginning of each line should be retained (as literals) by default.
No preference
Other
You may select 1 option

View results
Author Message
PostPosted: June 6th, 2005, 3:50 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Quote:
I have in mind code like,
If SimpleTest Then SimpleAction Else
I don't see how it could be done without introducing ambiguity that breaks existing scripts. For example, the part in blue of the following line could be either part of the window's title or the literal word "Else":

if (x = 0) then WinActivate, WinTitle Else Run Notepad

Robert Carnegie wrote:
Perhaps I misunderstood how ( ... ) works. Is something like (> ... ) feasible as an extension of that syntax?
That's an interesting idea. Perhaps it can be done with a concise second character, perhaps two open-parentheses instead of one:
Code:
FileAppend,
((
    The indentation to the left of this line is ignored.
)

Thanks for the ideas.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: June 7th, 2005, 11:12 pm 
Offline

Joined: June 1st, 2005, 11:09 am
Posts: 54
Location: Scotland
Chris wrote:
Quote:
I have in mind code like,
If SimpleTest Then SimpleAction Else
I don't see how it could be done without introducing ambiguity that breaks existing scripts. For example, the part in blue of the following line could be either part of the window's title or the literal word "Else":

if (x = 0) then WinActivate, WinTitle Else Run Notepad

How about allowing a block in inline? Block start and block end treated as punctuation.
Code:
If SimpleTest {SimpleAction} Else
If ...


Okay, there's the {FunctionKey} collection to worry about, for one thing. Maybe {:...} (colon required) or { ... } (spaces before and after block) would help.

This isn't critical. If I wanted I could write my own parser to convert a script written "my way" to yours ... I think I could ;-)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 8th, 2005, 7:40 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Regarding the original topic, it seems best not to change the default to be LTrim. However, the directive #LTrim has been added to make multiple continuation sections use the LTrim setting.

In addition, line merging has been further improved: 1) A line starting with period/dot is automatically appended to the line above it (period is the concatenate operator in expressions); 2) Comments and blank lines may exist between continuation lines without affecting the merger.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3

All times are UTC [ DST ]


Who is online

Users browsing this forum: DataLife, Ragnar and 2 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group