I'm having a bit of a problem

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
XMLTorrent
Newbie
Posts: 6
Joined: Tue Aug 29, 2006 1:40 pm
Location: United States
Contact:

I'm having a bit of a problem

Post by XMLTorrent » Tue Aug 29, 2006 1:46 pm

Hey all. I'm new here and I have a question.

Before I begin, I want to say that I'm using QB4.5.

Now I've been reading tutorials all day and I've been reading about the TYPE keyword. I was typing in some code from a tutorial and it said something like this:

Code: Select all

TYPE SpellsType
     Name AS STRING * 20
     'More attributes after this
END TYPE
QB4.5 tells me that in the line that says Name AS STRING * 20, an expression is expected. I've done work with VB before and it's similar in syntax and it never ever told me something like that. Is there something wrong with the tutorial or something wrong with QB4.5 or am I totally off track? Thanks for the help in advance. :lol:

Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re » Tue Aug 29, 2006 1:59 pm

NAME is a registered keyword.
I have left this dump.

User avatar
Patz QuickBASIC Creations
Veteran
Posts: 399
Joined: Wed Mar 02, 2005 9:01 pm
Location: Nashville, Tennessee
Contact:

Post by Patz QuickBASIC Creations » Tue Aug 29, 2006 4:13 pm

Z!re wrote:NAME is a registered keyword.
Yeah, that is a bitch sometimes. You want to use a name that's easy to remember, but then QB has it reserved. Go figure.

Eclipzer
Newbie
Posts: 9
Joined: Sat Jul 08, 2006 7:01 am
Location: USA
Contact:

Post by Eclipzer » Tue Aug 29, 2006 11:48 pm

Patz QuickBASIC Creations wrote:
Z!re wrote:NAME is a registered keyword.
Yeah, that is a bitch sometimes. You want to use a name that's easy to remember, but then QB has it reserved. Go figure.
Here are a few of my "name" substitutes:

nam
nme
PlayerName
CharacterName
CharName
Title (my personal favorite)

-Eclipzer

User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} » Wed Aug 30, 2006 8:47 am

Eclipzer wrote:
Patz QuickBASIC Creations wrote:
Z!re wrote:NAME is a registered keyword.
Yeah, that is a bitch sometimes. You want to use a name that's easy to remember, but then QB has it reserved. Go figure.
Here are a few of my "name" substitutes:

nam
nme
PlayerName
CharacterName
CharName
Title (my personal favorite)

-Eclipzer
What! No N4m3???????!!!!!!!!!!!!1111shift+1!!!1!!one!!11!!shift+one!!!
Image

bungytheworm
Veteran
Posts: 288
Joined: Sat Feb 18, 2006 4:02 pm

Post by bungytheworm » Wed Aug 30, 2006 11:39 am

PlrName
CharName
CityName


But no Pl4N4m3 or Ch4rN4m3....gee i hate those :lol:

AiRMaN
Coder
Posts: 14
Joined: Sat Aug 19, 2006 11:28 pm
Location: Jordan

Post by AiRMaN » Thu Aug 31, 2006 2:14 pm

Z!re wrote:
NAME is a registered keyword.

I always knew it's a RESERVED keyword, where the heck did you come up with registered!?

There are several substitutes for 'Name', but few are good ones!, most of the programs I saw use 'Nom', 'Title' is really good, some use 'Caption'.

Never use PlayerName or CharName or suchlikes, besides looking hedious, it's stupid to have a 'Spell.SpellName' variable!

I like Nathan's 'N4m3' but it doesn't look professional to me!
~AiRMaN~

Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re » Thu Aug 31, 2006 8:16 pm

AiRMaN wrote:Z!re wrote:
NAME is a registered keyword.

I always knew it's a RESERVED keyword, where the heck did you come up with registered!?
Probably up your ass.
I have left this dump.

XMLTorrent
Newbie
Posts: 6
Joined: Tue Aug 29, 2006 1:40 pm
Location: United States
Contact:

Post by XMLTorrent » Thu Aug 31, 2006 8:44 pm

I just looked up the function of that keyword and quite frankly, I think it's the most useless keyword in the entire language.

But thanks for the help on that one. That was stumping me.

AiRMaN
Coder
Posts: 14
Joined: Sat Aug 19, 2006 11:28 pm
Location: Jordan

Post by AiRMaN » Sat Sep 02, 2006 9:45 am

Z!re wrote:
Probably up your ass.

You're a naughty girl, didn't your mom told you not to say words like these!

Anyway It's probably up yours, I don't have any because I work it all day long (Actually I have a cute one!)
~AiRMaN~

thegrogen
Coder
Posts: 14
Joined: Fri Mar 25, 2005 1:33 pm
Location: Vancouver BC
Contact:

Post by thegrogen » Sat Sep 02, 2006 4:02 pm

AiRMaN wrote: You're a naughty girl, didn't your mom told you not to say words like these!
I wouldn't talk back to Z!re... She's been rather moody lately.

You don't want her to cause an... incident, would you?
Current projects:
oberonOS
Project HYDROGEN

User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} » Sat Sep 02, 2006 7:37 pm

I agree. Zire, after all, is capable of murder.

She is like a mad women with a high frequency blade, AK-74u, and PSG-1.
Image

User avatar
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt » Sun Sep 03, 2006 4:44 am

AiRMaN wrote:I always knew it's a RESERVED keyword, where the heck did you come up with registered!?
Reserved, registered, semantics are kinda bogus here...might as well call it a pwned word, it'd work too...

AiRMaN
Coder
Posts: 14
Joined: Sat Aug 19, 2006 11:28 pm
Location: Jordan

You gotta be kidding me!

Post by AiRMaN » Mon Sep 04, 2006 10:31 am

Guyz, what the heck are you talking about?!, all this Don't talk back to Z!re, She's capable of murder!!, She's just a computer chick with a big mouth! and if she's capable of murder, I'm capable of even worse things.

Once a wise man said: "Don't mess up with the Dean!

Nekrophidius, maybe you're right, but I hold on to my thought!
~AiRMaN~

Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Re: You gotta be kidding me!

Post by Z!re » Mon Sep 04, 2006 1:58 pm

AiRMaN wrote:Guyz, what the heck are you talking about?!, all this Don't talk back to Z!re, She's capable of murder!!, She's just a computer chick with a big mouth! and if she's capable of murder, I'm capable of even worse things.

Once a wise man said: "Don't mess up with the Dean!

Nekrophidius, maybe you're right, but I hold on to my thought!
I once made a forum go down for several days... Funny thing is, I was banned at the time and didnt even attempt to access it..

Lets have a wet t-shirt competition, you go first, i promise to follow. Or maybe you're just full of shit and cant prove your tough words?
I have left this dump.

Post Reply