Jump to content

Find help file sometimes confusing


Recommended Posts

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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)

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...