Search found 567 matches

by cas
Wed Jul 28, 2021 5:50 pm
Forum: Announcement
Topic: PureBasic 6.00 Alpha 5 released !
Replies: 245
Views: 50322

Re: PureBasic 6.00 Alpha 3 released !

https://gcc.gnu.org/onlinedocs/gcc/Opti ... tions.html
Looks like purebasic passes -O2 parameter to gcc when you enable optimizations (i see -O0 and -O2 strings inside pbcompilerc.exe).
by cas
Wed Jul 28, 2021 2:13 pm
Forum: Announcement
Topic: PureBasic 6.00 Alpha 5 released !
Replies: 245
Views: 50322

Re: PureBasic 6.00 Alpha 3 released !

Optimization is not for source code but for a compiled binary file. It is just a gcc flag (/Ox). PureBasic just translates pb code to c code and then gcc does optimizations.
by cas
Mon Jul 19, 2021 9:35 am
Forum: Bugs - C backend
Topic: [Done] Alpha 3 - memory leak!
Replies: 9
Views: 3597

Re: Alpha 3 - memory leak!

Maybe the memory leak is occurring because the string returned by the procedure is not being assigned to anything. Does the leak still occur when it is assigned to a variable (i.e. a$ = Test() )? It does not matter that string returned by the procedure is not being assigned to anything. There shoul...
by cas
Sun Jul 18, 2021 7:09 pm
Forum: Bugs - C backend
Topic: [Done] Alpha 3 - memory leak!
Replies: 9
Views: 3597

Re: Alpha 3 - memory leak!

You are focusing too much on Space() function. It is not important. Replace it with a fixed string and there is still a memory leak. Procedure.s Test() Protected s.s = "1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-12345...
by cas
Sun Jul 18, 2021 3:37 pm
Forum: Bugs - C backend
Topic: [Done] Alpha 3 - memory leak!
Replies: 9
Views: 3597

Re: Alpha 3 - memory leak!

Curious. In which programming language will this algorithm work without leakage? In literally every programming language. Literally. Including PureBasic (FASM backend). How will the compiler know that on the second and subsequent iterations the buffer from the previous iteration needs to be freed? ...
by cas
Wed Jun 23, 2021 12:48 pm
Forum: Bugs - C backend
Topic: [Done] local array - memory leak
Replies: 2
Views: 964

Re: local array - memory leak

Confirmed. Looking at generated c file, SYS_FreeArray() function is missing.
by cas
Fri Jun 11, 2021 8:56 pm
Forum: Coding Questions
Topic: Why does response to Select Case repeat 2 - 3 times?
Replies: 6
Views: 600

Re: Why does response to Select Case repeat 2 - 3 times?

Replace #PB_EventType_LeftClick with #PB_EventType_Change
by cas
Wed Jun 02, 2021 6:58 pm
Forum: Feature Requests and Wishlists
Topic: Please new constant: "#PB_Declare"
Replies: 5
Views: 1985

Re: Please new constant: "#PB_Declare"

The simplest solution i can think of is with a constants. ; ============ Declarations CompilerIf Not Defined (_BoutonDessin_declared, #PB_Constant) Debug "The declaration has not been made, I declare it!" Declare BoutonDessin() #_BoutonDessin_declared = 1 CompilerElse Debug "The decla...
by cas
Fri May 28, 2021 11:52 am
Forum: Announcement
Topic: PureBasic 6.00 Alpha 5 released !
Replies: 245
Views: 50322

Re: PureBasic 6.00 Alpha 1 released !

Code: Select all

CompilerIf #PB_Compiler_Processor=#PB_Processor_C
  Debug "c backend"
CompilerElse
  Debug "fasm backend"
CompilerEndIf
by cas
Mon May 24, 2021 9:17 pm
Forum: Announcement
Topic: PureBasic 6.00 Alpha 5 released !
Replies: 245
Views: 50322

Re: PureBasic 6.00 Alpha 1 released !

Now, let do the same with Rust and you're in pole position. There is no point in doing that because you can only get unsafe rust code. But, if you really want that, you can do it already. Get c code with /commented flag and then run it through c to rust transpiler (for example https://c2rust.com/).
by cas
Sun May 23, 2021 1:48 am
Forum: Announcement
Topic: PureBasic 6.00 Alpha 5 released !
Replies: 245
Views: 50322

Re: PureBasic 6.00 Alpha 1 released !

Cezary wrote: Sat May 22, 2021 10:25 pm What it means?
This bug was already reported. Temporary fix until new update is to disable OnError lines support.
https://www.purebasic.fr/english/viewto ... 43&t=77317
by cas
Sat May 22, 2021 8:50 am
Forum: Bugs - C backend
Topic: [Done] Can't compile due to "Assembler error"
Replies: 5
Views: 755

Re: Can't compile due to "Assembler error"

This is a separate issue because disable OnError lines support fixes HeX0R's registry module compilation.
You should try to narrow your code down to a smallest possible code snippet that reproduces this error and post a new bug report.
by cas
Sat May 22, 2021 6:13 am
Forum: Announcement
Topic: PureBasic 6.00 Alpha 5 released !
Replies: 245
Views: 50322

Re: PureBasic 6.00 Alpha 1 released !

but I have noticed the C compiled programs are about 30% bigger. I have not noticed that. Maybe you are using some libs (UseSQLiteDatabase(),UsePNGImageEncoder(),...) in your apps that are now updated with a new PB version. Or you are maybe comparing 64bit exe with a previous 32 bit exe. Also make ...
by cas
Sat May 22, 2021 6:00 am
Forum: Bugs - C backend
Topic: [Done] Can't compile due to "Assembler error"
Replies: 5
Views: 755

Re: Can't compile due to "Assembler error"

Temporary fix: Compiler Options -> disable OnError lines support
by cas
Sat May 22, 2021 5:48 am
Forum: The PureBasic Editor
Topic: Can't select pbcompilerc - Add button does not work
Replies: 2
Views: 2784

Re: Can't select pbcompilerc - Add button does not work

You must first enter a path (click on "..." button below).