PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: FB 1.07  (Read 1491 times)

José Roca

  • Moderator
  • Guru Member
  • *****
  • Posts: 3215
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: 3215
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: 3215
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: 8905
  • 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: 3215
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: 3215
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: 3215
Re: FB 1.07
« Reply #6 on: June 18, 2019, 08:49:04 PM »

Modified WinFBX files.

Joerg Buckel

  • Junior Member
  • **
  • Posts: 93
  • 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

José Roca

  • Moderator
  • Guru Member
  • *****
  • Posts: 3215
Re: FB 1.07
« Reply #8 on: June 28, 2019, 05:52:23 PM »

I have made some small modifications in the declarations to deal with constant ansi strings.
« Last Edit: June 28, 2019, 06:14:54 PM by José Roca »
Logged

José Roca

  • Moderator
  • Guru Member
  • *****
  • Posts: 3215
Re: FB 1.07
« Reply #9 on: August 28, 2019, 01:01:35 PM »

I'm having problems when trying to compile with the latest released 64 bit compiler. While everything works fine with the 32 compiler, the 64 bit one doesn't find "windows.bi".

Command Line:
C:\Programs\WinFBE\FreeBasic-1.07.0\fbc64.exe -m "C:\Programs\Tests\00.bas" "" -v -s gui -i "C:\Programs\WinFBX" -w pedantic

FreeBASIC Compiler - Version 1.07.0 (08-25-2019), built for win64 (64bit)
Copyright (C) 2004-2019 The FreeBASIC development team.
target:       win64, x86-64, 64bit
compiling:    C:\Programs\Tests\00.bas -o C:\Programs\Tests\00.c (main module)
C:\Programs\WinFBX\Afx\CWindow.inc(14) error 23: File not found, "windows.bi" in '#include once "windows.bi"'

Joerg Buckel

  • Junior Member
  • **
  • Posts: 93
  • FF3 and WinFBE+WinFBX User
Re: FB 1.07
« Reply #10 on: August 28, 2019, 02:35:04 PM »

Hello José

Is this really the current version?
My currently installed compiler is shown with version 1.08.0.
Logged
Greeting from Germany

Joerg

José Roca

  • Moderator
  • Guru Member
  • *****
  • Posts: 3215
Re: FB 1.07
« Reply #11 on: August 28, 2019, 02:46:40 PM »

It is the last version released. 1.08 must be a work in progress.

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8905
  • Windows 10
    • PlanetSquires Software
Re: FB 1.07
« Reply #12 on: August 28, 2019, 03:10:04 PM »

....I'm setting up WinFBE with the new compiler. I'll post a download link for you to try shortly.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8905
  • Windows 10
    • PlanetSquires Software
Re: FB 1.07
« Reply #13 on: August 28, 2019, 03:23:02 PM »

Here is a first try at the integration:  https://www.planetsquires.com/files/WinFBE_Suite_107.rar

I tried a few compiles. Simple source code files seemed to compile okay for 32 and 64, but more involved source codes failed with various syntax errors. I need to read up on the big changes, or maybe there is a difference between the old 1.06 *inc files and the new 1.07 inc files.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Joerg Buckel

  • Junior Member
  • **
  • Posts: 93
  • FF3 and WinFBE+WinFBX User
Re: FB 1.07
« Reply #14 on: August 28, 2019, 04:06:13 PM »

Hello José
I also installed the current version 1.07.0 from the FreeBasic Forum.

I do not get the described error with me.
« Last Edit: August 28, 2019, 04:09:35 PM by Joerg Buckel »
Logged
Greeting from Germany

Joerg
Pages: [1] 2