Page 1 of 3

DefType -> Define

Posted: Sun Feb 05, 2006 11:01 am
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...

Posted: Sun Feb 05, 2006 11:15 am
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


Posted: Sun Feb 05, 2006 11:18 am
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.

Posted: Sun Feb 05, 2006 12:46 pm
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.

Posted: Sun Feb 05, 2006 12:54 pm
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.

Posted: Sun Feb 05, 2006 1:05 pm
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

Posted: Sun Feb 05, 2006 1:08 pm
by Dare2
Yo Jellybean,

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

:)

Posted: Sun Feb 05, 2006 1:13 pm
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.

Posted: Sun Feb 05, 2006 1:32 pm
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 ;)

Posted: Sun Feb 05, 2006 1:38 pm
by Psychophanta
freak wrote:Did you ever see "DefType" anywhere ?
Yeah!
In the grandfather of PB: BlitzBasic2 on Amiga :wink:

Re: DefType -> Define

Posted: Sun Feb 05, 2006 1:42 pm
by PB
> the IDE don't recognize "EnableExplicit" word, neither "Beep_()"

Confirmed for EnableExplicit, but Beep_() shows up fine for me.

Posted: Sun Feb 05, 2006 1:45 pm
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.

Re: DefType -> Define

Posted: Sun Feb 05, 2006 1:58 pm
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 .

Re: DefType -> Define

Posted: Sun Feb 05, 2006 2:21 pm
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.

Posted: Sun Feb 05, 2006 4:16 pm
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.