Hellooopsforgotsendcommand Posted September 11, 2010 Share 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? Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted September 11, 2010 Share 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 Link to comment Share on other sites More sharing options...
seandisanti Posted September 11, 2010 Share 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 Link to comment Share on other sites More sharing options...
Hellooopsforgotsendcommand Posted September 11, 2010 Author Share 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 Link to comment Share on other sites More sharing options...
ajag Posted September 11, 2010 Share 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) Link to comment Share on other sites More sharing options...
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