Re: Grades Program


[Prev][Next][Index][Thread]

Re: Grades Program



On Tue, 1 Oct 1996, ROB LINWOOD wrote:


> To recall concatenated strings, you need to search through the string, and
> find all the separators ("|"). This can be done with a slow search program I
> wrote. As I said, it can be slow...
>
> :For(X,1,lngth NAME
> :If sub(NAMES,X,1)=="|":then           ;Checks for "|"
> : <INSERT ACTION HERE>                 ;Do what you want
> :end                                   ;End of If..Then.. statement
> :end                                   ;End of For( loop
>
> As I said, on big strings, this can take a while. If anyone has any faster
> algorithm, I would appreciate it if it was posted to this list.
>
This might take a little more memory, but I think it would be faster (I
haven't chacked):
If the max length of each descrption is specified, say 10 characters,
then the 8th description would start on the 81st caharster in the string,
8*10+1.  This way one can calculate where the sub string is instead of
hunting for it using a loop. blank spaces could be used as fillers if
needed so displaying could be simple (all 10 characters) instaed of
having to find out the number of relavent characters to display.




__________________________
John Logan
n9342326@henson.cc.wwu.edu


References: