#2804 closed Feature Request (Completed)
UDF standards site outdated
Reported by: | guinness | Owned by: | Jos |
---|---|---|---|
Milestone: | Future Release | Component: | Documentation |
Version: | Severity: | None | |
Keywords: | Cc: |
Description
http://www.autoitscript.com/autoit3/udfs/UDF_Standards.htm
The page is a little outdated and needs some work when it comes to being clearer as to what we expect.
Attachments (0)
Change History (15)
comment:1 Changed 10 years ago by guinness
- Component changed from AutoIt to Documentation
comment:2 Changed 10 years ago by mLipok
comment:3 Changed 10 years ago by mLipok
QUESTION 2:
"Global variables must have an extra first letter "g". UDF global variables must start with underscore."
Whats the difference ?
specifying:
when to use:
$gVARNAME
and
when to use:
$_gVARNAME
or even:
$__gVARNAME
comment:4 Changed 10 years ago by mLipok
QUESTION 3:
Can I use:
$_iVARNAME $__iVARNAME $_sVARNAME $__sVARNAME
instead
$_giVARNAME $__giVARNAME $_gsVARNAME $__gsVARNAME
comment:5 Changed 10 years ago by mLipok
QUESTION 4:
how many lower dashes can be used in function name (not counting the initial of course)
Example
Func _UDFNAME_DoSome_or_DoAnother_Thing() ...... EndFunc
comment:6 Changed 10 years ago by mLipok
QUESTION 5:
All function names must closely resemble the established naming convention for "internal" AutoIt functions.
Can you explain / clarify ?
comment:8 Changed 10 years ago by mLipok
QUESTION 6:
The first word of the function name should start with a word describing a general category such as “Date”, “String”, “Array”, “Network”, etc.. If the word is too long like “Window”, then an obvious abbreviation may be used (e.g. “Win” for “Window” or “Net” for “Network”).
The first word of the function name ? can be related to the technology or product name
Such as:
_Word_
_Excel_
_WinSCP_
_XZip_
_QPDF_
_Acrobat_
_AcrobatReader_
comment:9 Changed 10 years ago by mLipok
and finally :
Please treat my questions as suggestions on what might be better described.
As these questions arise in my case to me for a long time ago, since I first read UDF_Standards.htm, and stabilized in such a form as in the preceding questions.
comment:10 Changed 10 years ago by Melba23
mLipok,
Trac is not the place for discussion - as so often you seem to be treating it as an extension of the forum. guinness was using the Trac ticket as a reminder, not an invitation for comment.
In future, if you want to start a discussion on any topic please start a thread in the forum - you will get a wider audience and Trac will become a lot less cluttered.
Thanks in advance for your cooperation,
M23
comment:11 Changed 10 years ago by mLipok
Ok
And sorry for confusion.
mLipok
comment:12 Changed 10 years ago by Mat
- Owner set to Jon
- Status changed from new to assigned
Reassigning to Jon as he needs to make those changes.
The wiki is probably the correct place for this. There is a [best coding practices](http://www.autoitscript.com/wiki/Best_coding_practices) page, as well as a page I started for UDF standards: http://www.autoitscript.com/wiki/UDF-spec
comment:13 Changed 10 years ago by Jos
- Owner changed from Jon to Jos
I have added a redirect to the Wiki page in the old UDF's page.
Let me know if this is what you want.
I have left the old content in case it is still needed.
Jos
comment:14 Changed 10 years ago by guinness
- Resolution set to Completed
- Status changed from assigned to closed
comment:15 Changed 10 years ago by TicketCleanup
- Milestone set to Future Release
Automatic ticket cleanup.
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
so I have few question:
QUESTION 1:
"All variables must be declared at the beginning of the UDF with a “Local” scope and before they are used for the first time."
I focus on this statement:
.... at the beginning of the UDF with a “Local” scope ....
Is it all right ?
or you mean:
.... at the beginning of the UDF with a “Global” scope ....