PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: FB 1.07  (Read 204 times)

José Roca

  • Moderator
  • Guru Member
  • *****
  • Posts: 3177
FB 1.07
« on: June 18, 2019, 02:52:58 PM »

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:

Code: [Select]
#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:

Code: [Select]
DIM cws AS CWSTR = "Дмитрий Дмитриевич Шостакович"
AfxMsg MID(cws, 2)

instead of:

Code: [Select]
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
« Last Edit: June 18, 2019, 03:06:56 PM by José Roca »
Logged

José Roca

  • Moderator
  • Guru Member
  • *****
  • Posts: 3177
Re: FB 1.07
« Reply #1 on: June 18, 2019, 03:09:46 PM »

BTW the new compilers have implemented the -strip and -nostrip options to remove or not local symbols. Without using -strip, the size of the .exe is bigger.

José Roca

  • Moderator
  • Guru Member
  • *****
  • Posts: 3177
Re: FB 1.07
« Reply #2 on: June 18, 2019, 05:12:05 PM »

I have also changed all occurrences of BYREF AS CONST WSTRING to BYREF AS WSTRING.

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8782
  • Windows 10
    • PlanetSquires Software
Re: FB 1.07
« Reply #3 on: June 18, 2019, 05:29:52 PM »

Excellent, thanks Jose. I am not ready yet to upsize WinFBE to FB 1.07 but I will. I want the editor to always be using close to the latest version of FB as possible.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

José Roca

  • Moderator
  • Guru Member
  • *****
  • Posts: 3177
Re: FB 1.07
« Reply #4 on: June 18, 2019, 07:58:28 PM »

The main change is that you no longer will need to use ** when working with CWSTR and the new compilers. With the small conditional changes that I have made to the WinFBX classes, you can use ** with older compilers and omit ** with the new compilers. Old code that uses ** will work both with the old and the new compilers. Therefore, you don't need to change existing code.

José Roca

  • Moderator
  • Guru Member
  • *****
  • Posts: 3177
Re: FB 1.07
« Reply #5 on: June 18, 2019, 08:43:21 PM »

I have needed to make a small change to the CMaskedEdit control. All the other code seems to be working correctly.

José Roca

  • Moderator
  • Guru Member
  • *****
  • Posts: 3177
Re: FB 1.07
« Reply #6 on: June 18, 2019, 08:49:04 PM »

Modified WinFBX files.

Joerg Buckel

  • Junior Member
  • **
  • Posts: 78
  • FF3 and WinFBE+WinFBX User
Re: FB 1.07
« Reply #7 on: June 19, 2019, 03:25:50 AM »

Hello José

Many thanks for the adaptations.
Logged
Greeting from Germany

Joerg