nested functions

Richard Kreiss rkreiss at gccconsulting.net
Wed Feb 25 08:53:30 PST 2015


This may be a Ken question:

I recently needed to pass a name from one file record to a process in another process.  This was done by passing the command line to a system call and using -ry with the name from the record.

However, this proved to create a problem as there was a space between the first and last name.  Only the first name was being passed by -ry.  My fault.  I then added a comma to the name value and created programming to remove the comma.

My initial solution:
Cm(2,.0)=strtok(@px,",") - locate the position of the comma
Pn=mid(@px,"1",cm-"1")<mid(@px,cm+"1","40")	 - 40 character is the length of pn in the first file.	

Later I realized I could add
P=@px{"" - remove any space
L(2,.0)=len(p) - get the character length of p

Then change the name hash to: pn=mid(@px,"1",cm-"1")<mid(@px,cm+"1",L+(cm+"1"))

Or pn=mid(@px,"1",cm-"1")<mid(@px,cm+"1",len(p)+(cm+"1"))

Yes, I should change @px to p in the mid function.

My question is how complex can one use before filePro has a problem handling it. (assuming that the functions are used properly)

The next question, for clarity in programming is the programmer better off keeping things simpler?


Richard Kreiss
GCC Consulting

Office: 410-653-2813




More information about the Filepro-list mailing list