Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #15674
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Help with Array implementation |
| Date | 2012-09-15 12:16 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <k329l1$eks$1@dont-email.me> (permalink) |
| References | <7ae00a01-5ca8-485e-9c42-6ee1cc4627c7@googlegroups.com> <15beef8b-05aa-442d-9661-1731612dd802@t9g2000pbc.googlegroups.com> <a53f2aa4-7ee0-4237-a902-522db6ca1a2f@googlegroups.com> <928e8f62-5a29-4984-a6d8-d7dee706e8e5@googlegroups.com> |
On 9/14/2012 4:38 PM, hughaguilar96@yahoo.com wrote: > On Friday, September 14, 2012 9:58:02 AM UTC-7, (unknown) wrote: >>>>>> I have a couple of implementations of arrays in my novice package:> > http://www.forth.org/novice.html> > > > I recommend that you not mess with implementing data structures until> > you have attained some experience writing programs. Does you Array implementation have bounds checking? > > Yes. 1ARRAY etc. have bounds checking. There is a compile-time switch that turns this on and off. As I recall, I am only checking for too large of an index and not for negative indices --- you might want to add the check for negative indices as an exercise. As I recall, ARY doesn't have bounds checking at all. I did something like this with help from this group I seem to recall. I used "within" to check both the upper and lower bound of the index. The funny part is that this code uses a lot of forth words that I use no where else, so every time I return to this code I have to relearn it all over again. I guess the arteries are starting to harden... Rick
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Help with Array implementation programmingkidx@gmail.com - 2012-09-13 19:40 -0700
Re: Help with Array implementation programmingkidx@gmail.com - 2012-09-13 19:46 -0700
Re: Help with Array implementation Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-09-13 19:50 -0700
Re: Help with Array implementation programmingkidx@gmail.com - 2012-09-14 09:58 -0700
Re: Help with Array implementation Jason Damisch <jasondamisch@yahoo.com> - 2012-09-14 10:56 -0700
Re: Help with Array implementation Doug Hoffman <glidedog@gmail.com> - 2012-09-14 17:12 -0400
Re: Help with Array implementation hughaguilar96@yahoo.com - 2012-09-14 13:38 -0700
Re: Help with Array implementation rickman <gnuarm@gmail.com> - 2012-09-15 12:16 -0400
Re: Help with Array implementation Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-09-16 16:25 -0700
Re: Help with Array implementation Mark Wills <forthfreak@gmail.com> - 2012-09-17 00:22 -0700
Re: Help with Array implementation "Elizabeth D. Rather" <erather@forth.com> - 2012-09-13 21:06 -1000
Re: Help with Array implementation "Elizabeth D. Rather" <erather@forth.com> - 2012-09-13 21:29 -1000
Re: Help with Array implementation Mark Wills <forthfreak@gmail.com> - 2012-09-14 00:45 -0700
Re: Help with Array implementation "Elizabeth D. Rather" <erather@forth.com> - 2012-09-13 21:55 -1000
Re: Help with Array implementation Coos Haak <chforth@hccnet.nl> - 2012-09-14 21:10 +0200
Re: Help with Array implementation "Elizabeth D. Rather" <erather@forth.com> - 2012-09-14 09:14 -1000
Re: Help with Array implementation Doug Hoffman <glidedog@gmail.com> - 2012-09-14 09:25 -0400
Re: Help with Array implementation Mark Wills <forthfreak@gmail.com> - 2012-09-14 00:47 -0700
csiph-web