Search found 1568 matches

by jj2007
Sep 18, 2020 23:19
Forum: Beginners
Topic: Releasing memory from large strings
Replies: 7
Views: 83

Re: Releasing memory from large strings

... will setting the string to null return its memory to the heap? Yes, using msvcrt.free, which in turn uses RtlFreeHeap I know it's difficult to use an assembly level debugger, but what I wrote is the truth, and you won't get the truth from FRE(). However, if you insert a Sleep as shown below, yo...
by jj2007
Sep 18, 2020 20:37
Forum: Community Discussion
Topic: FreeBASIC optimization issues
Replies: 6
Views: 132

Re: FreeBASIC optimization issues

There is nothing to optimise: These are obviously addresses.
by jj2007
Sep 18, 2020 20:31
Forum: Beginners
Topic: Releasing memory from large strings
Replies: 7
Views: 83

Re: Releasing memory from large strings

fzabkar wrote:... will setting the string to null return its memory to the heap?
Yes, using msvcrt.free, which in turn uses RtlFreeHeap
by jj2007
Sep 18, 2020 19:33
Forum: Community Discussion
Topic: FreeBASIC optimization issues
Replies: 6
Views: 132

Re: FreeBASIC optimization issues

fatman2021 wrote:It is a Linux program not a Windows program.
So what? They are addresses, as adeyblue rightly noticed.
by jj2007
Sep 17, 2020 8:31
Forum: General
Topic: Data Compression
Replies: 53
Views: 1171

Re: Data Compression

Data Compression Explained by Matt Mahoney Matt is definitely a top expert in the field. Anybody who seriously wants to start with compression should consult his site. Another site to consult: https://www.maximumcompression.com/data/summary_mf.php (sort by efficiency - I use FreeArc, in spite of so...
by jj2007
Sep 16, 2020 7:09
Forum: General
Topic: Data Compression
Replies: 53
Views: 1171

Re: Data Compression

albert wrote:I've tried several thousand formulas for data compression...
None of them worked...
I've tried only a handful, they all worked. Maybe you should change your general approach? Reading instead of writing, for example?
by jj2007
Sep 16, 2020 6:30
Forum: Libraries
Topic: how to create .3bd files?
Replies: 4
Views: 154

Re: how to create .3bd files?

viewtopic.php?f=14&t=15409&start=885#p238175

angros47 will give you a detailed answer when he is around ;-)
by jj2007
Sep 15, 2020 23:32
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 956
Views: 197876

Re: MiniB3d for FreeBasic

by jj2007
Sep 15, 2020 18:25
Forum: General
Topic: A split function implementation code [like VB]
Replies: 11
Views: 270

Re: A split function implementation code [like VB]

Nice code, xywhsoft! Here is some code for getting the time to load a textfile into a string array using s2=Split(pContent, chr(13, 10)) : #include "recall.bi" #include "windows.bi" #include "crt.bi" ' Global variable, used to save the number of returned split strings D...
by jj2007
Sep 15, 2020 7:48
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 956
Views: 197876

Re: MiniB3d for FreeBasic

How do I install a Library to FBIDE? Hi Ivan, As an example, the Cairo library would sit in two locations: C:\MyBasics\FreeBasic\lib\win32\Cairo\*.dll C:\MyBasics\FreeBasic\inc\Cairo\*.bi Once the necessary files sit there, you can compile e.g. C:\MyBasics\FreeBasic\lib\win32\Cairo\line.bas (if you...
by jj2007
Sep 12, 2020 17:47
Forum: Community Discussion
Topic: FreeBASIC 1.08 Development
Replies: 201
Views: 16451

Re: FreeBASIC 1.08 Development

Yes 'memcpy' may induce an undefined behavior although the compiler can easily determine in which direction to copy so as not to overlap (and it usually does), but it may also depend on the optimizations applied. 'memmove' guarantees everything. So replace 'memcpy' (the seco...
by jj2007
Sep 12, 2020 9:31
Forum: Community Discussion
Topic: FreeBASIC 1.08 Development
Replies: 201
Views: 16451

Re: FreeBASIC 1.08 Development

What about adding elementInsert to the core FB language? See FreeBasic Insert string into array : Comparing MasmBasic's Insert against the respective FB macro written by fxm : elementInsert (array, index, element) is only marginally slower than Insert array(), index, element :thumbsup: The executabl...
by jj2007
Sep 11, 2020 22:05
Forum: Beginners
Topic: Initialising an array with many empty elements
Replies: 15
Views: 411

Re: Initialising an array with many empty elements

Sounds suspiciously close to a linked list ;-)
by jj2007
Sep 11, 2020 15:09
Forum: Beginners
Topic: Initialising an array with many empty elements
Replies: 15
Views: 411

Re: Initialising an array with many empty elements

dodicat wrote:Some other basics have an insert method (power basic for example), and masm basic??
For string arrays: Insert, Delete, QSort, Recall, Store and many others; press Ctrl F in that page and search for Array
by jj2007
Sep 11, 2020 9:41
Forum: Beginners
Topic: Initialising an array with many empty elements
Replies: 15
Views: 411

Re: Initialising an array with many empty elements

Another option would be to load the array with data as strings 1...17, then to insert the empty strings: Read sAttnam() Insert sAttnam(14), 169 ' insert 169 empty strings; see Insert() Insert sAttnam(185), 69 I searched the FB manual but could not find an INSERT ...

Go to advanced search