BBC BASIC for Windows
Programming >> BBC BASIC language >> Type Mismatch error with DIM(struct{})
http://bb4w.conforums.com/index.cgi?board=language&action=display&num=1430833994

Type Mismatch error with DIM(struct{})
Post by onlyonemac on May 5th, 2015, 1:53pm

Hi,

I cannot work out what is causing this error. I don't remember this happening before so it might be the new version because I upgraded recently (I am currently using version 5.60b).

When I use the syntax "size% = DIM(structure{})" I get a "Type mismatch" error.

What is causing this and what can I do about it?

Thanks,

onlyonemac
Re: Type Mismatch error with DIM(struct{})
Post by rtr2 on May 5th, 2015, 2:48pm

on May 5th, 2015, 1:53pm, onlyonemac wrote:
What is causing this and what can I do about it?

Please list a short, self-contained, program which demonstrates the issue. This minimal example works correctly in v6.00a:

Code:
      DIM structure{test}
      size% = DIM(structure{})
      PRINT size% 

Richard.

Re: Type Mismatch error with DIM(struct{})
Post by onlyonemac on May 5th, 2015, 2:53pm

Supplied program does not work in 5.60b.
Re: Type Mismatch error with DIM(struct{})
Post by rtr2 on May 5th, 2015, 3:36pm

on May 5th, 2015, 2:53pm, onlyonemac wrote:
Supplied program does not work in 5.60b.

That is twice now that you've mentioned v5.60b (I assumed the first time it was a typo for v6.00a) which is an ancient, long obsolete version - released eight years ago almost to the day!

The only current, supported, versions of BB4W are v5.95a and v6.00a.

Richard.

Re: Type Mismatch error with DIM(struct{})
Post by onlyonemac on May 5th, 2015, 4:16pm

Well I don't know how I ended up with such an old version as I always run the upgrade program after a new installation of BBC BASIC for Windows. Perhaps I should get a newer upgrade program wink .
Re: Type Mismatch error with DIM(struct{})
Post by onlyonemac on May 5th, 2015, 4:19pm

Yeah I had run the old upgrade utility. I have a newer version and now with version 5.95a it seems to be working as usual! Sorry for my stupidity but I don't normally keep track of version numbers very well.