Page 1 of 1
[Implemented] String constants from ASCII codes please
Posted: Wed Feb 12, 2003 10:14 am
by BackupUser
Restored from previous forum. Originally posted by dmoc.
I recently went to define a string constant for NewLine+CarriageReturn
but couldn't figure out how. If it's not possible it would be a nice feature.
(Implemented with #CRLF$ etc.)
Posted: Wed Feb 12, 2003 11:09 am
by BackupUser
Restored from previous forum. Originally posted by fred.
Ok.
Fred - AlphaSND
Posted: Wed Feb 12, 2003 12:07 pm
by BackupUser
Restored from previous forum. Originally posted by Rings.
I like those constants ,for example in VB its named:
vbCr Carriage Return
vbLf LineFeed
vbCrLf CarriageReturn and Linefeed
so why not do it like:
pbCr
pbLf
pbCrLf
Its a long way to the top if you wanna .....CodeGuru
Posted: Tue Feb 18, 2003 12:49 pm
by BackupUser
Restored from previous forum. Originally posted by theogott.
I am just trying to port something from PowerBasic (cause I think it'll run faster in Purebasic).
In Powerbasic we have Constants like:
$C ="A String"
$XYZ = 99
AT compiletime the compiler just inserts these items where
the "placeholder" $XYZ is. Then everybody can make his own set of constants ...
*************************
The best time to do things is now !
Posted: Tue Feb 18, 2003 1:46 pm
by BackupUser
Restored from previous forum. Originally posted by freak.
@theogott
I don't get you point.
You can do this in Purebasic:
#Constant = 256
#Constant2.s = "Hello World"
This is just, what you talk about, isn't it?
Timo
Posted: Tue Feb 18, 2003 2:23 pm
by BackupUser
Restored from previous forum. Originally posted by Pupil.
> #Constant2.s = "Hello World"
you don't have to use the '.s' extension..
Posted: Tue Feb 18, 2003 3:53 pm
by BackupUser
Restored from previous forum. Originally posted by Manolo.
>vbCr Carriage Return
>vbLf LineFeed
>vbCrLf CarriageReturn and Linefeed

GRRRRRRRRRRR....
And the work of the programmer???? Is this???? Nooooooorrrrrrrrr...
Is this:
PB_Cr.s= Chr(13);Carriage Return
PB_Lf.s= Chr(10);LineFeed
PB_CrLf.s=CarriageReturn and Linefeed
Or if you prefer:
#PB_Cr=Chr(13);Carriage Return
#PB_Lf= Chr(10);LineFeed
#PB_CrLf=CarriageReturn and Linefeed
Do you like???
Is best. OK. The programmer need expand yours ideas. OK??
Regards. I only nedd floats. This is my request to Fred, not simplicism.
Regards.
Manolo
Posted: Fri Feb 21, 2003 3:29 pm
by BackupUser
Restored from previous forum. Originally posted by theogott.
Yes thanks.
If its there, then you can define everything else easily in a ".pbi"-file.
*************************
The best time to do things is now !