Search found 2950 matches

by marcov
Sep 16, 2020 18:21
Forum: General
Topic: Let us talk about memory layout of classes Microsost C++ vs gnu g++ vs FreeBASIC !
Replies: 9
Views: 4254

Re: Let us talk about memory layout of classes Microsost C++ vs gnu g++ vs FreeBASIC !

Actually they are afaik "thiscall" which is a method version of stdcall.
by marcov
Sep 16, 2020 13:38
Forum: General
Topic: Data Compression
Replies: 53
Views: 1171

Re: Data Compression

@marcov Over the last couple years , I've tried several thousand formulas for data compression... None of them worked... Try to find a good explanation of lz77/huffman, to understand the core concept of exploiting entropy. This is the basis of all compression. Entropy is basically the existence of ...
by marcov
Sep 15, 2020 11:50
Forum: General
Topic: A split function implementation code [like VB]
Replies: 11
Views: 270

Re: A split function implementation code [like VB]

strncmp is C99.
by marcov
Sep 13, 2020 13:07
Forum: Beginners
Topic: Initialising an array with many empty elements
Replies: 15
Views: 411

Re: Initialising an array with many empty elements

jj2007 wrote:Sounds suspiciously close to a linked list ;-)


Actually it is more like a tree mapped to an array, since it has O(log(n)) lookup behaviour.

But the point is that it can be instantiated statically (as a constant). I use such lookup tables a lot.
by marcov
Sep 13, 2020 12:05
Forum: General
Topic: Data Compression
Replies: 53
Views: 1171

Re: Data Compression

Such compression types are often called RLE - run-length encoding. It is quite common e.g. in certain image formats like TIFF that often have long stretches of the same color (fax documents). One of the original compression algorithms (LZ77, aka zip deflate) is basically a generalization of RLE with...
by marcov
Sep 11, 2020 20:04
Forum: Beginners
Topic: Initialising an array with many empty elements
Replies: 15
Views: 411

Re: Initialising an array with many empty elements

Or don't make an array of strings but an array of structs with an index and a string. To read a value, make a small func to binsearch the array for the index field to match x and then return the string
by marcov
Sep 11, 2020 19:07
Forum: General
Topic: Data Compression
Replies: 53
Views: 1171

Re: Data Compression

The key word for compression is entropy.
by marcov
Sep 07, 2020 7:52
Forum: Community Discussion
Topic: FreeBASIC 1.08 Development
Replies: 201
Views: 16451

Re: FreeBASIC 1.08 Development

__FB_ARG_LEFTOF__(arg,sep) to get the left of separator of a macro argument __FB_ARG_RIGHTOF__(arg,sep) to get the right of separator of a macro argument __FB_ARG_COUNT__(args...) to count the number of arguments in a list I can get the count, but it must be 1 or 2, since I can only get the right o...
by marcov
Sep 06, 2020 17:51
Forum: General
Topic: Commandline parsing problem
Replies: 25
Views: 1891

Re: Commandline parsing problem

Which can be interpreted in three ways: 1. ugly but correct - it's a Windows "feature" Definitely not, it is a feature of the MSVCRT runtime, not necessarily windows (kernel32/user32) 2. ugly and incorrect - as a coder, I want to decide myself what to do with the commandline 3. ugly but i...
by marcov
Sep 05, 2020 17:17
Forum: General
Topic: Commandline parsing problem
Replies: 25
Views: 1891

Re: Commandline parsing problem

I reread the thread in more detail (and better separating old from new posts), and indeed vs does interpret quotes.

testprogram "C:\Documents and Settings\Zippy\"

prints trailing "

Ugh
by marcov
Sep 04, 2020 23:01
Forum: General
Topic: Commandline parsing problem
Replies: 25
Views: 1891

Re: Commandline parsing problem

Afaik VIsual Studio does not do this, so I doublechecked. Yes, MSDN has old functions for it (NT4 POSIX system?), but VS is not using them, running e.g. int main(int argc, char *argv[]) { printf("%s %d\n", argv[1],strlen(argv[1])); return 0; } in e.g. VS 2015 with \t as commandline param (...
by marcov
Sep 04, 2020 7:26
Forum: General
Topic: Commandline parsing problem
Replies: 25
Views: 1891

Re: Commandline parsing problem

Ubuntu mate 18.04, 64-bit, mate terminal 1.20.0: On *nix it depends on the shell how parameters are expanded. IOW the escapes are processed before the parameters are passed to the program. The argv/argc generating API functions are probably meant to imitate this. But that is *nix emulation, and IMH...
by marcov
Aug 30, 2020 19:41
Forum: General
Topic: Commandline parsing problem
Replies: 25
Views: 1891

Re: Commandline parsing problem

I'm running under 32-bit Windows and generating 32-bit apps. This behaviour is an annoyance. ISTM that anything on the command line should be interpreted as is, otherwise what is the point of the Command keyword? InterlockedCompareExchange64 is afaik 64-bit only, so something in that header is eith...
by marcov
Aug 30, 2020 10:28
Forum: General
Topic: Commandline parsing problem
Replies: 25
Views: 1891

Re: Commandline parsing problem

Are you on a 32-bit windows? Or do you only generate 32-bit apps?
by marcov
Aug 30, 2020 9:39
Forum: Community Discussion
Topic: FreeBASIC 1.08 Development
Replies: 201
Views: 16451

Re: FreeBASIC 1.08 Development

Note that allowing $ in the symbol table might force it creeping back into non legacy code via inter module connections, Since an exported symbol must then be match in the spelling. IOW if you declare A$ in module A and export it, if it is in the symbol table as A$ and mangled as such, module B must...

Go to advanced search