PS> To: scoug-programming@scoug.com
PS> Subject: SCOUG-Programming: More\1b[1;33m2queue\1b[1;33m2stuff\1b[0m
PS>
PS> dallasii@kincyb.com wrote:
PS> >
PS> > when you put a line on the queue, put the element # on with it.
PS> >
PS> > The possible advantage of putting the line number is that you might
PS> > be able to search until you find a desired item, and just leave the
PS> > queue in a 'random' rolodexed position, instead of always
PS> > having to make sure you get it reset with item #1 on top and
PS> > the last at the bottom, before going on to something else.
PS>
PS> Yah, good idea. Thanks.
PS>
PS> - Peter
This should also work if you're not index/counting the items,
but using a hash/association type structure for tracking the
members.
You've probably figured this out by now ( or just looked it up in
some reference. :-) ), but I just did a test and confirmed that QUEUED()
returns the # of lines in the queue, and not the # of characters.
This should eliminate any need to put the count back on the top
of the queue.
Since the things are global not just to the program, but to the OS,
you should never have to EXPOSE the queue itself (and probably can't),
just a variable holding it's name.
PS>
PS>
Regards,
Dallas E. Legan II
(562) 862 - 4854 ext. '*'
L
E
G
A
N
@
A
C
M
.
O
R
G
=====================================================
To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-programming".
For problems, contact the list owner at
"rollin@scoug.com".
=====================================================
<< Previous Message <<
Return to [ 18 |
November |
1998 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.