HP3000-L Archives

October 2001, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Ron Wuerth <[log in to unmask]>
Reply To:
Ron Wuerth <[log in to unmask]>
Date:
Thu, 25 Oct 2001 17:15:21 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (69 lines)
>(you do know the whole purpose of this exercise is to get everyone digging
into
>'help', right? :-)

Well...yeah...but I'm playing along! :-)

>> 2.  If used correctly within your "mkarray" script, you can
>>      accept data that is NOT ordered, misaligned, and no need
>>      for even a binary search, because you have direct access
>>     once the array is created.

>hmmm....  that's right :-)

>assuming (and that's that dangerous thing :-) the data is word-able, then
yes.

Modifying the example in "help word" if I do the following at the CI

LEE(SYS): echo ![word('file a=bb,old;rec=40,,f,ascii',chr(32),1)]
file

and

LEE(SYS): echo ![word('file a=bb,old;rec=40,,f,ascii',chr(32),2)]
a=bb,old;rec=40,,f,ascii

I've explicitly named the "space" (chr(32)) as my delimiter which
breaks that rather complex string into two words, as the only space
is after the word "file".  By explicitly naming space, all other default
delimiters no longer apply and it is the ONLY delimiter used.

I'm thinking as long as the record is at least ASCIIbetical and can be
delimited it's wordable.  I believe one of the criteria was the data file
was plain text, so this shouldn't be a major stumbling block.

I could have chosen the semi-colon as the delimiter instead to get
two (albeit different) words also, so you can see there is much play
with what's "wordable".

>> We use the ACTUAL "key" numeral (the first data item
>> in the rec) as the array index, (which makes it more like
>> a hash).

>yes....  what if the key isn't numeric?  i think we're still ok.....?

More limits, yes.  Only characters that are valid in variable names
will suffice.   The key would have to be comprised of numbers, letters
or the underscore ( _ ).   Any combination of these in any order will be
fine, however, since we use this as a suffix and not a prefix to "_ma_val".

Additionally, you are limited to a key of 248 characters max.  (255 max
variable name size - len("_ma_val") [7] = 248).  But I think that's the
least
of the problems if one has keys longer than that and is trying to write CI
scripts to deal with them! :-)

>> Now to search for a specific value to use IF available,
>> instead of the "binsrch" routine you have direct access
>> as follows:

> all-in-all -- you've made several excellent observations!          - d

Why thank you! ;-)  I do my bestest!

Ron

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2