CoderJeff has been making changes to the compiler to allow seamless integration of UDT classes that extend ZTRING/WSTRING with FB intrinsic functions.
So far, the only changes that I have needed to do to the WinFBX framework are:
#if __FB_VERSION__ < "1.07.0"
TYPE CWSTR
#else
TYPE CWSTR EXTENDS WSTRING
#endif
This makes the class compatible with the new version and older versions.
With the new version we can do:
DIM cws AS CWSTR = "Дмитрий Дмитриевич Шостакович"
AfxMsg MID(cws, 2)
instead of:
DIM cws AS CWSTR = "Дмитрий Дмитриевич Шостакович"
AfxMsg MID(**cws, 2)
Although ** is still valid and will work both with the new and the older versions.
I also have removed a wrong cast (not caught by te older versions) in the AfxBase64EncodeW and AfxBase64DecodeW functions in AfxStr.inc.
The latest builds of the compiler are available at:
http://users.freebasic-portal.de/stw/builds/#553 (17.06.2019 05:26:33)
udt-wstring: PRINT/LPRINT/WRITE will accept UDT as Z|WSTRING (commit: 3368c2f) — coder
#552 (16.06.2019 19:50:20)
udt-wstring: allow type extends zstring|wstring (commit: 176a562) — coder
udt-wstring: LTRIM, RTRIM, TRIM will accept UDT as z|wstring (commit: f02b30d) — coder
udt-wstring: LCASE, UCASE, will accept UDT as z|wstring (commit: da305e5) — coder
udt-wstring: allow UDT->wstring conversions in astNewCONV (commit: adc12dd) — coder
udt-wstring: INSTR, INSTRREV, will accept UDT as z|wstring (commit: 7a96a53) — coder
udt-wstring: MID function will accept UDT as z|wstring (commit: 47b461e) — coder
udt-wstring: SADD/STRPTR will accept UDT as Z|WSTRING (commit: 57360ed) — coder
udt-wstring: add TYPE EXTENDS Z|WSTRING [, udt] (commit: 9220036) — coder
udt-wstring: LSET/RSET statements will accept UDT as z|wstring (commit: d5272bd) — coder
udt-wstring: MID statement will accept UDT as Z|WSTRING (commit: 135f364) — coder
udt-wstring: ASC function will accept UDT as Z|WSTRING (commit: 2e7d606) — coder
udt-wstring: STR/WSTR function will accept UDT as Z|WSTRING to return a (commit: aefa43e) — coder
udt-wstring: SELECT statement will accept UDT as Z|WSTRING to return a (commit: f2fbc61) — coder
udt-wstring: SWAP statement will accept UDT as Z|WSTRING (commit: d9a09d7) — coder
udt-wstring: IIF function will accept UDT as Z|WSTRING (commit: ff66fc1) — coder