Jump to content

multiple statements per line


Recommended Posts

hi folks,

Is there a way to code multiple statements per line?

Here is an example of what I am looking for:

Dim $tElapsed : $tElapsed = 0

Where the semi-colon is used as a statement separator.

cheers, jw

you can set the value in the declare if that is what your trying to accomplish

Dim $tElapsed = 0

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

.. ?? i swear his reply was just here... ok well here:

Dim $tElapsed, $tElapsed = 0

It was, but I found it to be redundant using the same variable, it should give a warning or error

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

It was, but I found it to be redundant using the same variable, it should give a warning or error

I took from the fore-going comments that a comma could be used

as a statement separator.

When I tried that, I got the following diagnostic:

"Error: Illegal text at the end of statement (one statement per line)."

From that, I guess the conclusion is that there is no such provision

for multiple statements per line, as one may find in other languages

(e.g. vbScript).

cheers, jw

Link to comment
Share on other sites

Data declarations are the only place in AutoIt where multiple statements per line are allowed. There is no general way of doing this in AutoIt as there is in some other languages.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...