Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Literals-String/PureBasic/literals-string-1.basic
Normal file
16
Task/Literals-String/PureBasic/literals-string-1.basic
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
; Characters (*.c), can be ASCII or UNICODE depending on compiler setting
|
||||
Define.c AChar='A'
|
||||
; defines as *.a it will be ASCII and *.u is always UNICODE
|
||||
Define.a A='b'
|
||||
Define.u U='水'
|
||||
|
||||
; Strings is defined as **.s or ending with '$'
|
||||
Define.s AStrion ="String #1"
|
||||
Define BStrion.s ="String #2"
|
||||
Define CString$ ="String #3"
|
||||
; Fixed length stings can be defined if needed
|
||||
Define XString.s{100} ="I am 100 char long!"
|
||||
|
||||
; '"' can be included via CHR() or its predefined constant
|
||||
Define AStringQuotes$=Chr(34)+"Buu"+Chr(34)+" said the ghost!"
|
||||
Define BStringQuotes$=#DOUBLEQUOTE$+"Buu"+#DOUBLEQUOTE$+" said yet a ghost!"
|
||||
6
Task/Literals-String/PureBasic/literals-string-2.basic
Normal file
6
Task/Literals-String/PureBasic/literals-string-2.basic
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Select StringByteLength("X")
|
||||
Case 1
|
||||
Print("ASCII-mode; Soo, Hello world!")
|
||||
Case 2
|
||||
Print("UNICODE-mode; Soo, 您好世界!")
|
||||
EndSelect
|
||||
Loading…
Add table
Add a link
Reference in a new issue