Search found 86 matches

by thrive4
May 27, 2025 16:30
Forum: Beginners
Topic: set ptr to null and or declare ptr as null (pointer)
Replies: 7
Views: 1565

Re: set ptr to null and or declare ptr as null (pointer)

Once again to all many thanks for the input. Just a small twist on this pointer thing all that has been discussed applies to: https://www.freebasic.net/wiki/CatPgMemory or freebasic's Memory Functions, specifically 'Dynamic Memory' calls with regard of deallocation right? So when it come to external...
by thrive4
May 26, 2025 13:03
Forum: Beginners
Topic: set ptr to null and or declare ptr as null (pointer)
Replies: 7
Views: 1565

Re: set ptr to null and or declare ptr as null (pointer)

First of many thanks for the speedy reply much appreciated. @Paul exercise common sense: setting a pointer to null or not 'after use' depends on what will happen with that pointer next for example, if that pointer is owned by some object (you set it to null to indicate 'not owning any pointer right ...
by thrive4
May 26, 2025 11:46
Forum: Beginners
Topic: set ptr to null and or declare ptr as null (pointer)
Replies: 7
Views: 1565

set ptr to null and or declare ptr as null (pointer)

So the pointer thing, does freebasic do something auto-magically regarding declaring a pointer or after use? Should it be: Dim aptr As Integer Ptr = NULL or does this suffice? Dim aptr As Integer Ptr Also it seems that, pending on the structure of the code, setting the pointer to NULL after use is p...
by thrive4
Mar 11, 2025 12:21
Forum: General
Topic: Drive information
Replies: 2
Views: 2137

Re: Drive information

Well ehhr better late then never ... ? As far as I can tell the most platform 'independent' way would be to use 'shell' https://www.freebasic.net/wiki/KeyPgShell however the code would need something along the lines of: ' get metric os dim os as string os = "unknown" #ifdef __FB_WIN32__ os...
by thrive4
Mar 11, 2025 11:51
Forum: Projects
Topic: sqlite import / export util supports csv, json, html, sql and xml
Replies: 3
Views: 4325

Re: sqlite import / export util supports csv, json, html, sql and xml

Once again a quite sizable update: update v1.3 10/03/2025 - started a baseline sqlite fts5 implementation import datasources csv, json, folder, xml and rudimentary text and exif info specific filetypes issues: fts5 'rank' is a reserved name so the fieldname needs to be renamed there are issues with ...
by thrive4
Mar 11, 2025 11:47
Forum: Sources, Examples, Tips and Tricks
Topic: String Function count() - Count all instances of a character in a string
Replies: 3
Views: 1977

Re: String Function count() - Count all instances of a character in a string

A small riff on the code of fxm gets the most occurring character in a string optionally checks only alphabetic characters ' search number of occurances of character in string ' courtesy fxm https://www.freebasic.net/forum/viewtopic.php?t=31778 function charcount(byval haystack as string,byval needl...
by thrive4
Jan 01, 2025 16:24
Forum: Community Discussion
Topic: Basic programmer will die?
Replies: 54
Views: 21976

Re: Basic programmer will die?

BASIC as a language is deader than disco nowadays. I beg to differ... :wink: https://images.squarespace-cdn.com/content/v1/583c906ebe659429d1106265/1557352688740-WNKAWAMJ8LTY2HIY1L9J/giphy.gif?format=2500w So for 2025... https://i.makeagif.com/media/1-13-2023/g4mMjb.gif Best wishes for 2025, and yo...
by thrive4
Nov 19, 2024 12:36
Forum: Projects
Topic: imageviewer with sdl2
Replies: 2
Views: 5342

Re: imageviewer with sdl2

some recent updates: update v1.6 19/11/2024 - rewrite commandline handling - cleanup conf.ini removed unused settings - added default imagefolder in conf.ini - added generate m3u by searching on one tag | artist, title, album, genre and year | slideshow <audiosource> <tag> <tagquery> | example: slid...
by thrive4
Nov 19, 2024 12:33
Forum: Projects
Topic: slideshow with sdl2 plus ken burns effect
Replies: 2
Views: 4979

Re: slideshow with sdl2 plus ken burns effect

some recent updates: update v1.5 19/11/2024 - fix resolvepath handling of ..\<path>\<file> - fix get day of the weeek switched to GetLocalTime > wDayOfWeek - fix to commandline handling resolvepath after switches -v, etc - fixed error handling locale - regression checkpath (see 1.2) fixed again - re...
by thrive4
Nov 12, 2024 13:48
Forum: Sources, Examples, Tips and Tricks
Topic: using webgl aka shadertoy shaders with sdl2 and freebasic
Replies: 0
Views: 5176

using webgl aka shadertoy shaders with sdl2 and freebasic

description This example is a slight twist to djpeters 'offline shadertoy' the twist being the shader output is bound to an sdl window. Also demonstrated is a hybrid usage of opengl with a regular sdl window, some basic proportional placement and the pitfalls with using multiple windows in sdl2. No...
by thrive4
Nov 12, 2024 12:17
Forum: Sources, Examples, Tips and Tricks
Topic: resolve relative path when using command() on windows
Replies: 0
Views: 4698

resolve relative path when using command() on windows

Small snippet of code which helps with resolving the value of an command() argument. examples test with <app> ..\<path> <app> ..\<path><file> <app> <path> path in this case a folder in same dir as <app> <app> <fullpath> fullpath g:\data <app> <switch> switch -v, -h, /? etc #include once "window...
by thrive4
Nov 11, 2024 12:03
Forum: Windows
Topic: Different behaviour with console
Replies: 1
Views: 9705

Re: Different behaviour with console

All though posted a while back still many thanks for sharing the code. The following code is a variant which specifically focuses on mode 3 aka compiled in gui mode and launched by an console prompt. Just to clarify there are some snags: AttachConsole() has a nasty habit of adding a crlf which resul...
by thrive4
Oct 09, 2024 16:09
Forum: Community Discussion
Topic: happy birthday basically....
Replies: 5
Views: 4110

happy birthday basically....

It might have been mentioned before, could not find a posting on it, but 2024 marks the 60 year anniversary of the language basic... As such I would like to say to all congrats and here's to many more! Here is a nice article going down memory lane in 2014: https://time.com/69316/basic/ 'And eventual...
by thrive4
Sep 20, 2024 13:10
Forum: Projects
Topic: audioplayer with un4seen bass or sdl2 mixer
Replies: 2
Views: 7910

Re: audioplayer with un4seen bass or sdl2 mixer

a recent update adding some basic .m3u (playlist) generation with search via the commandline bass version: update v1.6 20/09/2024 - getuilabelvalue implemented full automatic spacing - added generate m3u by searching on one tag . artist, title, album, genre and year . audioplayer <audiosource> <tag>...
by thrive4
Apr 02, 2024 12:39
Forum: Libraries & Headers
Topic: preview builds of sdl3
Replies: 0
Views: 11544

preview builds of sdl3

Just a heads up the preview builds of sdl3 are, gradually, being released see: https://github.com/libsdl-org/SDL/releases There are a large number of changes from sdl2 to sdl3 see migration readme: https://github.com/libsdl-org/SDL/blob/main/docs/README-migration.md It will be quite chore to convert...