You can modify the way that NewFunctions are named by adding this macro definition at the end of your macros.cnf file, located at the Origin folder:
def newfunction {
for(ii=1;ii>0;ii++) {
%n=F$(ii); if(exist(%n)==1) continue;
break; };
%n=F$(ii); // standard F# name
getstring (Function name) %n (New Function);
// ask if standard name is valid:
// type a new one of you want
%n=%b;
if(exist(%n)==1)
{
for(ii=1;ii>0;ii++) {
%n=%b$(ii); if(exist(%n)==1) continue;
break; };
%n=%b$(ii);
type -b "Already exists!\nUsing %n";
};
// add a number at the end if that given
// name exists.
create %n -f 10;
def ErrorProc {del %n;};
set %n; // edit function
del -m ErrorProc;
}
To update the definition, you should restart Origin or run the macros file executing "run macros.cnf".
To rename an existing function, use the set command with the -n option, like this:
set OldName -n NewName;
- Jose Via
Origin WebRing member
Edited by - Jose on 03/05/2002 10:18:29