Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / EndType gives error?

Author
Message
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 28th May 2007 18:18
Hi, I was using this example from a newsletter (28) to learn how to use types and arrays, as they were confusing me.

This block of code


Gives me this error

It highlights in red the "endtype" but endtype is at line 22 .

Please could you help an extremely confused DBP newbie?

thanks,

E.D.

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 28th May 2007 19:23
its not the end type giving the errors. Its the actual code inside the type(dbp can't really give the line number if its in a type for some reason). You're type should look like this:


Hello
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 28th May 2007 20:00
yup, if u put $,# then why declare it as string,real in the first place ? think about it

Could you help me treat my injured Dino-Fly ?
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 28th May 2007 20:05 Edited at: 28th May 2007 20:07
Uh.... it still gives the same error.
First I just re-typed my code, then I copied and pasted yours, but it still did the same thing .

Thanks for the help guys,



E.D.

Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 28th May 2007 23:10
We need your entire code, because it's probably another part of it.


MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 29th May 2007 10:50


As I said before, this is NOT my code, I am merely trying to learn how to use arrays and types, because they confuse me .

E.D.

spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 29th May 2007 11:51
The problem is all those ... (3 dots) on end of comments. That siginifies to DBPro that te following line should be concatonated.

In Editor, go to Tools, System Options and either disable concat directive or change the ... to something else.

Boo!
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 29th May 2007 11:57 Edited at: 29th May 2007 11:58
Ok, the types work now.... but now all my code is grey (like it was remmed) but it still works.

So I don't have blue for commands etc.

Any knowledge why??

Oh, it's not just that code.... it's all my codes .

E.D.

spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 29th May 2007 12:31
Sounds like you unticked 'use syntax highlighting' by mistake. Turn it back on.

Boo!
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 29th May 2007 12:44
Aha, everything works fine now, thanks very much.

E.D.

Login to post a reply

Server time is: 2024-09-26 22:50:25
Your offset time is: 2024-09-26 22:50:25