Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#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 by guinness, 12 years ago

Component: AutoItDocumentation

comment:2 by mLipok, 12 years ago

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

comment:3 by mLipok, 12 years ago

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 by mLipok, 12 years ago

QUESTION 3:
Can I use:

$_iVARNAME
$__iVARNAME
$_sVARNAME
$__sVARNAME

instead

$_giVARNAME
$__giVARNAME
$_gsVARNAME
$__gsVARNAME

comment:5 by mLipok, 12 years ago

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 by mLipok, 12 years ago

QUESTION 5:

All function names must closely resemble the established naming convention for "internal" AutoIt functions.

Can you explain / clarify ?

comment:7 by TicketCleanup, 12 years ago

Version: Other

Automatic ticket cleanup.

comment:8 by mLipok, 12 years ago

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 by mLipok, 12 years ago

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 by Melba23, 12 years ago

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 by mLipok, 12 years ago

Ok
And sorry for confusion.
mLipok

comment:12 by Matt Diesel, 12 years ago

Owner: set to Jon
Status: newassigned

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 by Jos, 12 years ago

Owner: changed from Jon to Jos

I have added a redirect in the old UDF's page to open to the Wiki UDF page .
Let me know if this is what you want.
I have left the old content in case it is still needed.

Jos

Last edited 12 years ago by Jos (previous) (diff)

comment:14 by guinness, 12 years ago

Resolution: Completed
Status: assignedclosed

comment:15 by TicketCleanup, 12 years ago

Milestone: Future Release

Automatic ticket cleanup.

Modify Ticket

Action
as closed The owner will remain Jos.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.