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 / type / end type command

Author
Message
viperjay
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: United States
Posted: 26th Jan 2004 22:09
Hi,

I notice that the type /end type command isn't listed in dbc help files?

Isn't that the command to lets you make diffrent mix vaules like
string and numeric ?
how important is it to my learning of programming?

will I need to buy dbpro ? to get that command?

thank you for your time


Viper Jay

dbc 1.13 enhanced : xp home : 768 mb : intel 1.6: geforce 3 ti 200
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 26th Jan 2004 22:26
if you use dark edit ide for dbc you can use User Defined Types. A UDT is an important concept in programming (VB6 has UDT's, C++/C#/VB.NET have Structures which are very similar) like a light weight object. A UDT is very useful but not mandatory to be a programmer, especially in db. Infact, user defined types are the only Obeject Oriented aspect of dbc/p language.

-RUST-
"What the... Mooooooooooo!"
viperjay
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: United States
Posted: 26th Jan 2004 22:30
Cattle Rustler

first thank you for your answer and now

what's the syntax for type and end type ?

thank you
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 26th Jan 2004 22:57
type Player
ID as integer
Name as string
endtype
oPlayer as Player

oPlayer.ID=1
oPlayer.Name="Joe"


or you can make an array of the type...
Dim oPlayers(9) as Player

oPlayer(0).ID=0
oPlayer(0).Name="Joe"

oPlayer(1).ID=1
oPlayer(1).Name="CMC 101"

-RUST-
"What the... Mooooooooooo!"

Login to post a reply

Server time is: 2024-11-26 01:34:27
Your offset time is: 2024-11-26 01:34:27