Page 1 of 1
Posted: Mon Dec 31, 2001 6:55 pm
by BackupUser
Restored from previous forum. Originally posted by Danilo.
Hello !!
Thats a gerneral question about
the PureBasic-Syntax.
I want to know how *you* like
new commands if i write a new
Library.
(The libraries are *for you*)
Given is a command "XYZ" which has
some "subfunctions".
Which Syntax do you like ??
1.) XyzCreate, XyzAdd, XyzDelete
or
2.) CreateXyz, AddXyz, DeleteXyz
I dont care much about it, but i think
XyzCreate
XyzAdd
XyzDelete
looks a little bit better, because
you can see easier which main-command
is used.
Better example:
Code: Select all
> SystrayCreate
> SystrayAdd
> SystrayDelete
>-------------------
> CreateSystray
> AddSystray
> DeleteSystray
Which Syntax is better ??
Thanks,
...Danilo
(registered PureBasic user)
Posted: Mon Dec 31, 2001 8:11 pm
by BackupUser
Restored from previous forum. Originally posted by PB.
Which Syntax is better ??
I prefer NAMExyz instead of xyzNAME, because it's easier to find the commands
in an index that way, and they stay grouped. Otherwise, the commands are
"split up" and are not always immediately obviously related to each other.
PB - Registered PureBasic Coder
Posted: Mon Dec 31, 2001 10:16 pm
by BackupUser
Restored from previous forum. Originally posted by Danilo.
Thanks PB, but that wasnt clear at all
Do you like
SystrayAdd
SystrayDelete
SystrayCreate
or
CreateSystray
AddSystray
DeleteSystray
Thanks,
...Danilo
(registered PureBasic user)
Posted: Mon Dec 31, 2001 11:02 pm
by BackupUser
Restored from previous forum. Originally posted by PB.
SystrayAdd
SystrayDelete
SystrayCreate
I like this version, because the commands can be grouped together in the docs,
alphabetically.
PB - Registered PureBasic Coder
Posted: Mon Dec 31, 2001 11:09 pm
by BackupUser
Restored from previous forum. Originally posted by preacher.
SystrayAdd
SystrayDelete
SystrayCreate
I like this too, looks best and is more "readable".
[Preacher]
Posted: Tue Jan 01, 2002 12:59 am
by BackupUser
Restored from previous forum. Originally posted by blueb.
Happy New Year!
Personally I like the makers of functions and DLL's
to use the form: maker_function
e.g. my company uses BP_Add
BP_Delete, etc.
The reason for this is when you have to use DLL's, etc from
4 different developers, there is no confusion, as there can
be many functions that "Add" something.
e.g. BP_Add 'Bare Point Systems Add function
EZ_Add 'EZGUI Software's Add function
PB_Add 'Pure Basic's Add function
Just a thought,
--Bob
Posted: Tue Jan 01, 2002 4:12 pm
by BackupUser
Restored from previous forum. Originally posted by fred.
As you could have see it, I personnaly prefer the other form (AddSystray, Remove Systray) because it does the code easier to read (more 'human'). The other strange looks a bit strange... If SystrayAddIcon().. Just my point of view tough.
Happy new year !
Fred - AlphaSND
Posted: Wed Jan 02, 2002 4:44 pm
by BackupUser
Restored from previous forum. Originally posted by Ralf.
do you post a link to get these libraries when they are ready ?
Posted: Wed Jan 02, 2002 11:02 pm
by BackupUser
Restored from previous forum. Originally posted by Andre.
Hi!
Like Fred said - I also like more the "human" form of command names, e.g. CreateSystray(), AddGadget(),...
The should be no problem to find the searched commands, because:
1. All commands of a library are grouped together (see the Reference Manual)
2. Alphabetical order is available via the Commandindex.html
(3. An additional command index with FIRSTLY sorted by library, and SECONDLY sorted by command, should be no real problem with an updated version of the DocMaker tool... Fred ?)
Ciao
Andre
Posted: Thu Jan 03, 2002 1:12 am
by BackupUser
Restored from previous forum. Originally posted by Danilo.
Thanks for all the answers.
I will follow the PureBasic-Way
and use the commands
CreateCoolbar
UpdateCoolbar
AddCoolBar
DeleteCoolbar
etc...
Thanks,
...Danilo
(registered PureBasic user)