Search found 2955 matches

by marcov
Oct 14, 2020 20:20
Forum: General
Topic: I hate shell
Replies: 17
Views: 4924

Re: I hate shell

Same question. How do you know if the executed program/command returns an errorlevel?
by marcov
Oct 14, 2020 19:40
Forum: General
Topic: I hate shell
Replies: 17
Views: 4924

Re: I hate shell

jdmcbride wrote:
And rc being a string, would return the output of the command or the error text if it fails.


And how would the user differentiate between those two options?
by marcov
Oct 06, 2020 11:27
Forum: Hardware Interfaces / Communication
Topic: Try to use inpout32.dll
Replies: 43
Views: 823

Re: Try to use inpout32.dll

Maybe the importlib stub changes calling convention?
by marcov
Oct 02, 2020 14:58
Forum: Community Discussion
Topic: immutable thread titles?
Replies: 43
Views: 977

Re: immutable thread titles?

Afaik you can do python communication more highlevel through a dll. See e.g. https://wiki.freepascal.org/Python4Delphi

So it should be the matter of translating the header and figuring out some examples

Disclaimer: I don't use python, this is just from my saved urls stash.
by marcov
Oct 01, 2020 10:10
Forum: Community Discussion
Topic: immutable thread titles?
Replies: 43
Views: 977

Re: immutable thread titles?

Hmm, possibly also a bit of a wave in people's habits. In the (first) lockdown period, the Lazarus forums were very busy too, but now they are also fairly calm.
by marcov
Sep 25, 2020 14:10
Forum: Community Discussion
Topic: Reinventing the wheel
Replies: 17
Views: 636

Re: Reinventing the wheel

jj2007: yeah, the openstreet GIS stuff is particularly hairy.

BadIdea: quite ironic, considering that "Holland"'s etymologically comes from Holt-Land, iow wood-land.
by marcov
Sep 25, 2020 9:38
Forum: Community Discussion
Topic: Reinventing the wheel
Replies: 17
Views: 636

Re: Reinventing the wheel

Now that I've made the point clear, I would like to ask you guys a few things: - Have you ever been criticised this way? All the time. It doesn't help that I'm on a development platform (Delphi) that is notorious for its very conservative one-man shops. - Do you personally feel a natural aversion t...
by marcov
Sep 20, 2020 10:39
Forum: Documentation
Topic: Basic-Macros in fbc 1.08
Replies: 32
Views: 1371

Re: Basic-Macros in fbc 1.08

(fyi
.pp is already in use for Free Pascal (originally meaning something like pascal plus) and the build tool stuff "puppet".

It is easier to pick an unique extension that you can claim on github, ohloh etc)
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: 11
Views: 4423

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 15, 2020 11:50
Forum: General
Topic: A split function implementation code [like VB]
Replies: 11
Views: 349

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: 466

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 11, 2020 20:04
Forum: Beginners
Topic: Initialising an array with many empty elements
Replies: 15
Views: 466

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 07, 2020 7:52
Forum: Community Discussion
Topic: FreeBASIC 1.08 Development
Replies: 228
Views: 19174

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: 1997

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: 1997

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

Go to advanced search