DefType -> Define

Everything else that doesn't fall into one of the other PB categories.
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

DefType -> Define

Post by Psychophanta »

Why is changed DefType keyword to Define one?
I find no sense to it.

Besides of that, the IDE don't recognize "EnableExplicit" word, neither "Beep_()", and probably other...
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
jack
Addict
Addict
Posts: 1358
Joined: Fri Apr 25, 2003 11:10 pm

Post by jack »

I don't understand it either but am sure Fred had a reason, in the meantime, if you don't want to change all your Deftype to Define then use a macro

Code: Select all

Macro Deftype
  Define
EndMacro

User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

DefType stands for Define Type, and it is more standard and significative than Define. That's why i can't find a reason for this replacement.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

The reason is very simple actually:

"DefType" is the only statement in PB that is "shortcuted" of two words.
It simply did not fit with the naming of the other Commands and Keywords.

Since v4 broke the compatibility anyway because of some of the new stuff,
we thought we'd clean up some of these old inconsistencies as well.
quidquid Latine dictum sit altum videtur
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Then Asc() should be Ascii()
Eof() should be EndOfFile()
Len() should be Lenght()
Val, Chr, Lof, Cos, Int, Abs .....
Even these are functions, not statements.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

freak wrote:The reason is very simple actually:

"DefType" is the only statement in PB that is "shortcuted" of two words.
It simply did not fit with the naming of the other Commands and Keywords.

Since v4 broke the compatibility anyway because of some of the new stuff,
we thought we'd clean up some of these old inconsistencies as well.
While
..
Wend
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Yo Jellybean,

I don't understand the significance of the While .. Wend post. Are you saying it shouldn't be Wend?

:)
@}--`--,-- A rose by any other name ..
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Dare2 wrote:Yo Jellybean,

I don't understand the significance of the While .. Wend post. Are you saying it shouldn't be Wend?

:)
If you continue with the current PB philosophy, and you are consistent with it (read the Freak words), then Wend should be EndWhile.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

The mathematical function names are a standard. Same for things like Eof().
While/Wend exists in many languages too. Did you ever see "DefType" anywhere ?

If you don't like our naming choises, you can always use Macros now ;)
quidquid Latine dictum sit altum videtur
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

freak wrote:Did you ever see "DefType" anywhere ?
Yeah!
In the grandfather of PB: BlitzBasic2 on Amiga :wink:
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: DefType -> Define

Post by PB »

> the IDE don't recognize "EnableExplicit" word, neither "Beep_()"

Confirmed for EnableExplicit, but Beep_() shows up fine for me.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> If you don't like our naming choises, you can always use Macros now

Very true. Or just do a search/replace for DefType and get over it, because
many other commands have changed (ActivateGadget -> SetActiveGadget),
so there's no point complaining about DefType when dozens of others are
now different too. It's not like the change has broken your code or anything.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: DefType -> Define

Post by Psychophanta »

PB wrote:> the IDE don't recognize "EnableExplicit" word, neither "Beep_()"

Confirmed for EnableExplicit, but Beep_() shows up fine for me.
Beep_() should be with the B in Uppercase (if Enable Case correction is activated in preferences). But here it leaves in lowcase: beep_()

BTW: Should be very nice a .pbi with macros to compatibilize sources from previous PB version. I've no time, but perhaps someone dares to it :D .
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Re: DefType -> Define

Post by Dare2 »

Psychophanta wrote:
PB wrote:> the IDE don't recognize "EnableExplicit" word, neither "Beep_()"

Confirmed for EnableExplicit, but Beep_() shows up fine for me.
Beep_() should be with the B in Uppercase (if Enable Case correction is activated in preferences). But here it leaves in lowcase: beep_()

BTW: Should be very nice a .pbi with macros to compatibilize sources from previous PB version. I've no time, but perhaps someone dares to it :D .
:)

Swap is not being noticed by the IDE either.
@}--`--,-- A rose by any other name ..
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Hi, Timo.

If you do:

Define.f
[stuff...]

Define word has not any meaning because you are not defining anything, but:

DefType.f
[stuff...]

can be readen as Default Type.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Post Reply