Page 1 of 1
The ability to use substitute names for command names
Posted: Mon Jun 09, 2003 4:30 am
by Amiga5k
So I can use 'Function/EndFunction' instead of 'Procedure/EndProcedure'. But also, so very long command names such as 'CountTreeGadgetNodeItems' could be shortened to something easier to remember and quicker to type.
Russell
p.s. An advanced macro facility would make this a snap

(I know macros have been requested at least 1,327 times...)
Re: The ability to use substitute names for command names
Posted: Mon Jun 09, 2003 12:21 pm
by PB
> So I can use 'Function/EndFunction' instead of 'Procedure/EndProcedure'.
This has been asked for before and I don't think it's easily done. Also, it
raised the important issue of asking for help: if you have your own set of
commands, then you can no longer use these forums to ask for help...
because nobody will know what your commands are for, and they can't
just cut/paste your snippets to compile. Is that worth it?

Re: The ability to use substitute names for command names
Posted: Mon Jun 09, 2003 1:49 pm
by GPI
As i know, Macros are planed for PB and then such things are very easy to do.
You must only include always the definition-file in each project.
GPI
Re: The ability to use substitute names for command names
Posted: Tue Jun 10, 2003 7:14 am
by Amiga5k
PB wrote:> So I can use 'Function/EndFunction' instead of 'Procedure/EndProcedure'.
This has been asked for before and I don't think it's easily done. Also, it
raised the important issue of asking for help: if you have your own set of
commands, then you can no longer use these forums to ask for help...
because nobody will know what your commands are for, and they can't
just cut/paste your snippets to compile. Is that worth it?

Basically 'all' that would need to be done is, in the editor (the compiler would not need to be altered) a special version of the syntax highlighting list which is already used, would have an alternate name to look for. If this alternate name is found, it is highlighted just like the others and then when it's time to compile the editor looks through the code and replaces the new with the old before sending the file to the compiler.
As far as your last point, a simple 'show original keywords' menu item or button would search the document and un-replace the keywords and then the code could be easily copy\pasted to this forum.
Essentially, the whole purpose would be to make the commands that are already there shorter or, ahem, more sensibly named: The actual use of the commands would not be affected in any way.
I ask for this feature because this is one of the few things that bug me about PB: The keyword naming conventions - usually just way too long or sometimes misspelled

(sorry, Fred

)
(The other is the manual, but that is being worked on as we speak...)
Russell