DIM (was RE: DECLARE (was Re: Filepro-list Digest, Vol 78, Issue 28))
John Esak
john at valar.com
Sat Jul 24 00:49:11 PDT 2010
> > Our kids still act surprised at times when we remind them
> that we know the
> > "real" Howard Wolowitz.
> >
> > --
> > Kenneth Brody
>
> Ken,
>
> I have run into the same issue with arrays. I have found
> that the dim foobar() needs to occur prior to using the
> array. Never considered that this might be a "bug" if placed after
>
> Dummy variables, declared variables can be placed anywhere in
> the processing table. My preference, in most cases is at the
> top of the processing table.
>
>
> Created the following: Windows, fp 5.6.10
>
> keya ? If: '*******************************************
> Then: '* test an array
> 8 ------- - - - - - - - - - - - -
> - - - -
> ? If:
> Then: ming["1"]="harry"
> 9 ------- - - - - - - - - - - - -
> - - - -
> ? If:
> Then: ming["2"]="sally"
> 10 ------- - - - - - - - - - - - -
> - - - -
> ? If:
> Then: sl(1,.0)=listbox(ming)
> 11 ------- - - - - - - - - - - - -
> - - - -
> ? If:
> Then: END
> 12 ------- - - - - - - - - - - - -
> - - - -
> ? If:
> Then: dim ming(2)
> 13 ------- - - - - - - - - - - - -
> - - - -
>
> Save, syntax check:
>
>
>
> *** A filePro Error Has Occurred ***
>
> Line Number: 8
>
> ming["1"]="harry"
> ^
> Process contains a syntax error at position indicated.
>
> Move line 12 to line 8, no error
>
>
> Richard Kreiss
> GCC Consulting
> rkreiss at gccconsulting.net
Richard,
This is not a bug. I would say that it has been noted here on this forum
.... Since the days of the CompuServe forum as well.... At least 100+
times... That you can not refer to an array element on a processing table
until physically *after* the DIM ARRAYNAME[n]. This has NOTHING to do with
encountering the DIM line while interpreting the code... and this, too, has
been stated at least 100+ times on this forum and elsewhere as well. It has
been shown that:
then: gosub dimmit
then: aa=array["1"
then: ...
Then: ...
Dimmit if:
then: DIM array["10"]
then: return
is even not allowed, and will not work. Is this not in the STN book? I know
you refer to that often Richard.
Your description that an improper definition of an array generates a syntax
error is like saying... If I write the code wrong, Ken, it generates a
syntax error. :-)
I wouldn't comment about this, but this particular bit of instruction on how
to define an array is documented everywhere and many times throughout
filePro history... Both on line and in the paper manuals.
Normally, I wouldn't complain, but come on guys, this is a really basic Red
The Fine Manual thing. :-)
John
P.S. - I know it's hard to believe, but I've never seen Big Bang yet.
Everyone says it's funny as hell, and it must be the Universe conspiring
against me for some reason. I will buy a complete first year or package
like that and have a marathon watching sometime. I have to assume that the
show would have been funny even without Howie being the main character (or a
main character) since everything else Bill P. has done is really good. Is it
two seasons old now, or more than that? Does anyone know if it is on Blu
Ray, I would guess so. I'm not sure if I will splurge on it or just take the
money out of my "save up for the $23,000 Gibson ES 335". Ha! Actually,
that is a thing that would never be in my plans... Nothing is worth $23,000
except maybe a house... And because of my age, even that is a little
doubtful. The first house I lived in cost about $6,900. But this was, of
course, when a piece of penny bubble gum cost a penny. Reality has changed,
but not my relative value system, sorry. So, since I am an old time radio
(and TV) nut, and people for years have been giving me various sets of
complete shows... I have nearly 60 DVD sets of shows to watch dating from
the 50's. Even if I bought Big Bang today, I would only watch it in
absolutely chronological order from episode #1 on... But is there a
particularly great episode in which Howie's character is featured? Will it
seem like the Howie I know (and love)? This is something I will find out
for myself, but a few opinions wouldn't need an OT: designation on this
forum, would they?
More information about the Filepro-list
mailing list