Search found 35 matches
- Thu Mar 07, 2024 5:46 pm
- Forum: Coding Questions
- Topic: Can a structure be defined dynamically by csv headers
- Replies: 24
- Views: 3111
Re: Can a structure be defined dynamically by csv headers
My mind is a bit blown by how much code has to be written in PureBasic to do this
That is because those languages have CSV support in their respective standard libraries where PureBasic has not.
I agree... CSV support would be nice.
Keep in mind that there are many libraries native to pb ...
- Thu Mar 07, 2024 11:44 am
- Forum: Coding Questions
- Topic: Can a structure be defined dynamically by csv headers
- Replies: 24
- Views: 3111
Re: Can a structure be defined dynamically by csv headers
Thanks all for the help, it is great to get insights when you are just starting on a language. My mind is a bit blown by how much code has to be written in PureBasic to do this, because in R or Python it is a one liner. For example in Python Panda:
df2 = pd.read_csv(filepath,encoding = "latin1 ...
df2 = pd.read_csv(filepath,encoding = "latin1 ...
- Wed Mar 06, 2024 11:34 pm
- Forum: Coding Questions
- Topic: Can a structure be defined dynamically by csv headers
- Replies: 24
- Views: 3111
Re: Can a structure be defined dynamically by csv headers
A quick implementation with an user function:
EnableExplicit
Structure IndexArray
*Index[0]
EndStructure
PrototypeC.l Prototype_CallBack(*pCtx, argc.l, *argv.IndexArray, *colnames.IndexArray)
ImportC "sqlite3.lib"
sqlite3_create_function.l(DatabaseID, zFunctionName.p-utf8, nArg.l ...
- Wed Mar 06, 2024 8:19 pm
- Forum: Coding Questions
- Topic: Can a structure be defined dynamically by csv headers
- Replies: 24
- Views: 3111
Re: Can a structure be defined dynamically by csv headers
sqlite3.lib is statically loaded with your app.exe. No dependency, unless you need a feature not in the current lib. Then you would dynamically load sqlite3.dll of your compilation.
Fred said we can even statically load our own VS2022 versions of sqlite3.lib, but I have not succeeded yet.
Ok ...
- Tue Mar 05, 2024 1:04 am
- Forum: Coding Questions
- Topic: Can a structure be defined dynamically by csv headers
- Replies: 24
- Views: 3111
Re: Can a structure be defined dynamically by csv headers
I was thinking about using the DB library... but does that not then creates an external dependency on SQLite or whatever DB is being used? Would prefer to use something built into PureBasic for reliability.
- Tue Mar 05, 2024 1:00 am
- Forum: Coding Questions
- Topic: Can a structure be defined dynamically by csv headers
- Replies: 24
- Views: 3111
Re: Can a structure be defined dynamically by csv headers
Do you mean hashtable / map?DarkDragon wrote: Mon Mar 04, 2024 4:50 pm Structures have to be defined at compile time. For that use case hashmaps are typically used.
- Tue Mar 05, 2024 12:54 am
- Forum: Coding Questions
- Topic: Can a structure be defined dynamically by csv headers
- Replies: 24
- Views: 3111
Re: Can a structure be defined dynamically by csv headers
Thanks !mk-soft wrote: Mon Mar 04, 2024 7:20 pm You can use LinkedList ...
Found an old example but it work
https://www.purebasic.fr/german/viewtop ... 82#p310782
- Mon Mar 04, 2024 4:20 pm
- Forum: Coding Questions
- Topic: Can a structure be defined dynamically by csv headers
- Replies: 24
- Views: 3111
Can a structure be defined dynamically by csv headers
Can a structure, such as the example below from the PureBasic book be defined by the column headers in a CSV imported into PureBasic... or in any way by the user of the software. I guess what I am asking is, can the code itself be made to alter in response to what the user does.
Structure FISH ...
Structure FISH ...
- Mon Mar 04, 2024 1:49 pm
- Forum: Coding Questions
- Topic: Vintage computer compatibility
- Replies: 9
- Views: 1555
Re: Vintage computer compatibility
One other way to look at it is if you ccan compile C with Purebasic, you will also be able to compile C for most of those computers.
Not really, just because it has a c layer, doesn't mean it runs everywhere. Especially not since PB's standard libs are "only" available for mac, linux and ...
- Tue Feb 27, 2024 2:56 pm
- Forum: Coding Questions
- Topic: Vintage computer compatibility
- Replies: 9
- Views: 1555
Re: Vintage computer compatibility
Although I have not used them, it is more likely that I would use one of these two languages:
https://zxbasic.readthedocs.io/en/docs/ or https://en.wikipedia.org/wiki/Z88DK
Interesting, never seen that before. I guess PureBasic is more of a VB6 replacement / continuation than early Basic ...
- Tue Feb 27, 2024 2:52 pm
- Forum: Coding Questions
- Topic: Vintage computer compatibility
- Replies: 9
- Views: 1555
Re: Vintage computer compatibility
Start with the BASIC language of your old system of choice, as they will have far less commands that Purebasic.
Check that the use of each command will work in Purebasic.
For example on ZX Spectrum you have to use 10 LET X=1 ; that is , a line number and LET to define a variable.
Commodore 64 ...
- Tue Feb 27, 2024 1:01 pm
- Forum: Coding Questions
- Topic: Vintage computer compatibility
- Replies: 9
- Views: 1555
Vintage computer compatibility
I have in mind to create code that would be written in such a way that, while it runs on Windows, could easily be ported to other basic systems - especially older systems, such as Commodore Pet, TRS 80, Amstrad etc.
My question. What parts of Purebasic would be compatible with older basic systems ...
My question. What parts of Purebasic would be compatible with older basic systems ...
- Thu Sep 30, 2021 5:42 pm
- Forum: General Discussion
- Topic: PureBasic vs B4J
- Replies: 12
- Views: 4292
Re: PureBasic vs B4J
In the end - the best software for a job is the one that YOU can get stuff done with. Not anybody else ;)
ps: look at the top menu entry links->purebasic->resources on my website (you can ignore the security warning for now, i didnt bother to make my website https compatible yet).
Yes I think ...
- Thu Sep 30, 2021 2:51 pm
- Forum: General Discussion
- Topic: PureBasic vs B4J
- Replies: 12
- Views: 4292
Re: PureBasic vs B4J
Thanks for the insights. So PB produces faster software. In terms of build though, I suspect B4J's larger community has produced more extensive libraries, such as advanced maths - so it should make coding quicker.
PureBasic can esily interface with many third party libraries, there are ...
- Thu Sep 30, 2021 12:11 pm
- Forum: General Discussion
- Topic: PureBasic vs B4J
- Replies: 12
- Views: 4292
Re: PureBasic vs B4J
It's horses for courses!
Hi, this may or may not answer some of your question. I've used B4A and it's quite good for it's purpose mainly because java is native to android. But to use java on windoze desktop produces a massive overhead, although it still works I guess.
PB's basic is quite ...