Now, eight characters quad set are unabled on unicode mode.
We can just type 'ABCD' what is a very limitating type.
Is it possible to truncate natively high 8 bits set and gain this by type 8 characters instead of 4 ?
'ABCDEFGH' quad sed availability on unicode mode
Re: 'ABCDEFGH' quad sed availability on unicode mode
How should this work?
At the moment you can use 4 characters in unicode mode and this is a quad (65536 * 65536 * 65536 * 65535)
As far as I know, in Java is only one character allowed for character literals and this should be enough.
At the moment you can use 4 characters in unicode mode and this is a quad (65536 * 65536 * 65536 * 65535)
No, it's not possible. How would you show e.g. x/u = '€' in this case?Olliv wrote:Is it possible to truncate natively high 8 bits?
As far as I know, in Java is only one character allowed for character literals and this should be enough.
sorry for my bad english
Re: 'ABCDEFGH' quad sed availability on unicode mode
Here is some related stuff by Wilbert.
Of course can also use some macro to "pack" quad, but that looks better as for me
Of course can also use some macro to "pack" quad, but that looks better as for me
Code: Select all
; an example of infinite-lenght ASCII strings in unicode executable
DataSection
MyStr:
!db '12345678901234567890123456789012345678901234567890123456789012345678901234567890'
!db 13, 10
!db 'ggggggggggggggggggggggggggggggggggggggggggggggggggg'
!db 0
EndDataSection
Debug PeekS(?MyStr, -1, #PB_Ascii)
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
Re: 'ABCDEFGH' quad sed availability on unicode mode
A macro is actually a good idea if you need it for constants.Lunasole wrote:Of course can also use some macro to "pack" quad
Code: Select all
CompilerIf #PB_Compiler_Unicode
Macro _C(c)
(((c)>>16|(c)>>24&$ffff0000)|((c)|(c)>>8&$ffff))
EndMacro
CompilerElse
Macro _C(c)
(c)
EndMacro
CompilerEndIf
Macro _C2(ch, cl)
(_C(ch)<<32|_C(cl))
EndMacro
#Tiff = _C('Tiff')
#Jpeg = _C('Jpeg')
#JpegEnc_ = _C2('Jpeg','Enc_')
Debug Hex(#Tiff)
Debug Hex(#Jpeg)
Debug Hex(#JpegEnc_)
Windows (x64)
Raspberry Pi OS (Arm64)
Raspberry Pi OS (Arm64)
Re: 'ABCDEFGH' quad sed availability on unicode mode
After a time of thinking, this wish is too hard to be integrated.
@Josh
That is not exactly the using I did as put a '€' char.
'€' was 'EURO' simply.
I use it to put a readable word\expression as 'BLANC', 'BLEU', 'ROUGE', 'VERT', 'NOIR', etc...
For english\american coders 'WHITE', 'BLACK', 'RED', 'GREEN', 'BLUE', etc...
For german 'WEISS', 'BLAU', 'ROT', etc...
Here I take colours example, but there is x examples or domains. And I limit my example to only 3 languages too.
But if PureBasic Team changed the 'Expr' quotes adding a truncating converter from Unicode to Ascii just inside these specific quotes, I forget how could chinese coders, or japanese coders (limiting my examples to only 2 languages) to code.I doubt my wish would be really fair.
And finally, 'EURO' could be '€' more quickly and others usual symbols too...
@Josh
That is not exactly the using I did as put a '€' char.
'€' was 'EURO' simply.
I use it to put a readable word\expression as 'BLANC', 'BLEU', 'ROUGE', 'VERT', 'NOIR', etc...
For english\american coders 'WHITE', 'BLACK', 'RED', 'GREEN', 'BLUE', etc...
For german 'WEISS', 'BLAU', 'ROT', etc...
Here I take colours example, but there is x examples or domains. And I limit my example to only 3 languages too.
But if PureBasic Team changed the 'Expr' quotes adding a truncating converter from Unicode to Ascii just inside these specific quotes, I forget how could chinese coders, or japanese coders (limiting my examples to only 2 languages) to code.
Code: Select all
Select Alpha
Case '蓝'
BlueSet()
Case '黑'
BlackSet()
Case '绿'
RedSet()
EndSelect
And finally, 'EURO' could be '€' more quickly and others usual symbols too...