There are a couple of extensions around which allow renaming of
proc/fn names. I think they do this by locating the token value in the
BASIC tables and either swapping the corresponding names around or
renaming them by patching. There's one in DIY Toolkit - can't remember
its name, something like ALTER I think.

IIRC the way these sorts of extensions work is something like:

CHANGE_NAME_OF extension_name TO new_name

finds the token corresponding to extension_name, then finds the token
corresponding to new_name (and new_name should not already exist as a
name in BASIC) and swaps either the tokens or names about, in effect
creating a new dummy name and then swapping the names over.

Not the best solution to this problem, but at least if this is done
after the first extension is loaded to change a name then load the
second extension it gives a bodge method of working around the problem
of clashing names without resorting to permanently patching names in
other people's extensions files.

It should be possible to write a routine which loads an extensions
file or toolkit and look for the names table within it and list the
extensions out. That way, we can automate listing of existing toolkit
names (I have copies of most non-commercial toolkits in my PD
library).

Rich - as you and your colleagues on the BASIC Reference Manual have
documented the various toolkits for that, have you got listings of the
keywords in the various toolkits listed by toolkit? That may help
Wolfgang if he does decide to pursue this any further.
--
Dilwyn Jones
> > Usually every toolkit has a name. IMO the prefix should be derived
> > from that. This can as well be the name of the author (anybody
> > remember "Beule-Tools" from Peter(?) Beule?).
>
> As we're talking about SBASIC, I have spent much time thinking about
this,
> and come up with a more elgant solution than my original suggestion.
>
> Command: PREFER <command> <toolkit>
>
> Example: PREFER cmp_string tkx
>
> In a case where two toolkits have the same username, a method should
be
> created for a command to be identified with a toolkit by some simple
> abreviation. Thus, new toolkits would have some element or wand that
says
> the toolkit name and version (so people can PREFER commands from
different
> versions of the same toolkit) and use them in the same SBASIC
instance.
>
> More elgant from the user perspective - no doubt a challenge to
write.
>
> Just a suggestion.
>
> Dave
>
>
>

Reply via email to