Hellooopsforgotsendcommand Posted September 11, 2010 Posted September 11, 2010 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?
AdmiralAlkex Posted September 11, 2010 Posted September 11, 2010 The brackets mean that parameter is optional. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
seandisanti Posted September 11, 2010 Posted September 11, 2010 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
Hellooopsforgotsendcommand Posted September 11, 2010 Author Posted September 11, 2010 brackets let you know that the argument is optional and does not HAVE to be suppliedmaybe I missed it, I mean it would be nice if that was stated - that the brackets were just to show something was optional
ajag Posted September 11, 2010 Posted September 11, 2010 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 optionalthe 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)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now