pseudotypes

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

pseudotypes

Post by Psychophanta »

There are three types of pseudotypes:

p-ascii - to force the parameter to 8 bit Ascii
p-unicode - to force the parameter to 16 bit Unicode (DWCS)
p-bstr - to force the parameter to BSTR format (Visual Basic)
Couldn't be:
p_ascii
p_unicode
p_bstr
or simply: ascii, unicode and bstr
:?:
The minus "-" sign confuses a lot.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

spycho got a good point there, underscores may make more sense...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

Yes, i must agree the minus sign is a bad choice...
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Uffhh! at least i got an 'agree' for one thing :)
Even perhaps it was done like that to avoid to be confused with any eventual user defined Structure with the same name. But in that case there are another signs like ':' or wrap it into {} or something like that in order to difference it clearly...
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

no, as p_ascii can be a regular type. p-ascii is a special type, there is no confusion/collision possible with regular strutcure/interface types. BTW, why don't you try to use the new features instead of trying to change something we had spend of lot of time to think of ?
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Fred wrote:BTW, why don't you try to use the new features instead of trying to change something we had spend of lot of time to think of ?
You're right!
I hope to not find lots of bugs after converting codes... :)
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

If you find some, please report them so we can fix them quickly and have a nice final release.
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

So with the BSTR format, we can have something like the following:

Code: Select all

ProcedureDLL.b-str HelloWorld()
   ProcedureReturn "Whee"
EndProcedure
Then in theory, in Vb, after declaring the DLL command, we can call it..

Code: Select all

dim I as string
I = HelloWorld()

Call MsgBox("Test", I)
So no need for that work around stuff that was posted awhile back, for using PB dlls in VB?
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Nvm, workaround is still required.
Post Reply