Jump to content
Sign in to follow this  
Hellooopsforgotsendcommand

Find help file sometimes confusing

Recommended Posts

Hellooopsforgotsendcommand

In the help file you are given an examples of the format you should use eg.

DirCopy ( "source dir", "dest dir" [, flag] )

As a beginner I found this confusing as I thought the flag had to be surrounded by square brackets - but when you read further down to examples you see it doesn't

DirCopy(@MyDocumentsDir, "C:\Backups\MyDocs", 1)

why include brackets when in use they are not used?

Share this post


Link to post
Share on other sites
seandisanti

In the help file you are given an examples of the format you should use eg.

DirCopy ( "source dir", "dest dir" [, flag] )

As a beginner I found this confusing as I thought the flag had to be surrounded by square brackets - but when you read further down to examples you see it doesn't

DirCopy(@MyDocumentsDir, "C:\Backups\MyDocs", 1)

why include brackets when in use they are not used?

brackets let you know that the argument is optional and does not HAVE to be supplied

Share this post


Link to post
Share on other sites
Hellooopsforgotsendcommand

brackets let you know that the argument is optional and does not HAVE to be supplied

maybe I missed it, I mean it would be nice if that was stated - that the brackets were just to show something was optional

Share this post


Link to post
Share on other sites
ajag

maybe I missed it, I mean it would be nice if that was stated - that the brackets were just to show something was optional

For syntax documentation the Backus-Naur Form notation technique is used often (not only in the AutoIt-Helpfile but in many many manuals and helpfiles).

For example

  • the square backets "[]" mean optional
  • the pipe symbol "|" mean alternative choice ("A|B|C" --> choose A or B or C)

A-Jay


Rule #1: Always do a backup         Rule #2: Always do a backup (backup of rule #1)

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.