Search found 1350 matches

by caseih
Aug 30, 2019 4:21
Forum: General
Topic: [solved] I need your help for a C to FreeBASIC translation !
Replies: 5
Views: 2943

Re: I need your help for a C to FreeBASIC translation !

Bear in mind this is a declaration for a function that returns a function pointer. In other words you are meant to call the return value as a function.

It would look something like this:

Code: Select all

Type __GLXextFuncPtr as Sub ()

Declare Function glXGetProcAddressARB (zstring ptr) as __GLXextFuncPtr
by caseih
Aug 29, 2019 2:13
Forum: Community Discussion
Topic: is that right?!
Replies: 14
Views: 3493

Re: is that right?!

I'm not sure what you mean about "free for real." When you use FB delete, memory is released--it *is* freed for real. The pointers that may have pointed to the memory have nothing to do with that. The OS can't help it if you try to refer to some memory that you shouldn't be. FB is not Free...
by caseih
Aug 28, 2019 20:00
Forum: Community Discussion
Topic: is that right?!
Replies: 14
Views: 3493

Re: is that right?!

You're the programmer. You are the one who knows whether a pointer is "clean" or not. If you can't always make that clear, assign a NULL to the pointer after you delete the memory. I don't see any problem or "mess" with with FB. Having the language set pointers to NULL isn't some...
by caseih
Aug 24, 2019 1:30
Forum: Hardware Interfaces / Communication
Topic: Open Com With Root Privileges - Linux [solved]
Replies: 8
Views: 2955

Re: Open Com syntax

mark, are you using Linux? superuser should not be required to access a serial port in Linux. Instead you need to make your normal user a part of the built-in "dialout" group. Once you do that, then you can access serial ports as a normal user. Most linux distributions have GUI tools for m...
by caseih
Aug 22, 2019 19:53
Forum: Community Discussion
Topic: Running FreeBASIC on virtual or real Raspberry Pi.
Replies: 8
Views: 5959

Re: Running FreeBASIC on virtual or real Raspberry Pi.

Another good remote desktop solution you can use with the pi is X2Go. It's based on some of the same technologies as NoMachine is, but is in the Rasbian default software respository so it's an easy install.

https://wiki.x2go.org/doku.php/wiki:repositories:start
by caseih
Aug 06, 2019 0:58
Forum: Hardware Interfaces / Communication
Topic: FreeBasic communication with Arduino logic error?
Replies: 51
Views: 17242

Re: FreeBasic communication with Arduino logic error?

It's not necessary to be root to access serial ports. Nearly all modern Linux distros have a group called, somewhat anachronistically, "dialout" and all serial devices are by default set to be group read and write-able to that group ip. So you just need to add your user id to that group an...
by caseih
Aug 03, 2019 19:06
Forum: Beginners
Topic: Can FB simple animations be run on a website?
Replies: 9
Views: 6502

Re: Can FB simple animations be run on a website?

Are you wanting to make the animations be interactive? In other words are you trying to turn your FB programs into web-based programs that take user input from the web page and generate the appropriate animation? Or are you just wanting to capture the animations and re-play them back in a web page? ...
by caseih
Aug 03, 2019 3:18
Forum: Projects
Topic: FreeBASIC access to Rpi GPIO pins
Replies: 17
Views: 7395

Re: FreeBASIC access to Rpi GPIO pins

Using the code example below I get this error? blinkLedRpi.bas(18) error 42: Variable not declared, outout in 'open "/sys/class/gpio/gpio29/value" for outout as #hFile' Looking closely at that error message, the problem is that you spelled output wrong (outout). But that is a bit weird of...
by caseih
Jul 24, 2019 18:30
Forum: Beginners
Topic: Advantages of different GUI libraries
Replies: 18
Views: 7350

Re: Advantages of different GUI libraries

Is there a link to sample code embedding Tcl/Tk in Freebasic program? Not that I know of. Also I don't know of any FreeBASIC translations of the Tcl C header files, so you'd have to translate them into .bi files yourself, or at least translate enough of them to access the C api. This is what I trie...
by caseih
Jul 24, 2019 16:55
Forum: Beginners
Topic: Advantages of different GUI libraries
Replies: 18
Views: 7350

Re: Advantages of different GUI libraries

Can Tk be used from Freebasic? Yes it could, just as you can use Tk from C. But you'd need to translate the C header files into FB .bi files for the Tcl C API library. Basically you'd be embedding the Tcl interpreter inside your FB program, and then using the C API to interact with it, and to inter...
by caseih
Jul 23, 2019 21:54
Forum: Beginners
Topic: Advantages of different GUI libraries
Replies: 18
Views: 7350

Re: Advantages of different GUI libraries

Since when is WIN-API cross platform (WIN & LIN)? Natively, without WINE, that is. Well technically wine let's you compile win32 C (and C++) source code to native linux binaries using what they call winelib. The result is an elf executable and a few shared libraries. In fact you can even use wi...
by caseih
Jul 15, 2019 14:57
Forum: Community Discussion
Topic: New array features
Replies: 130
Views: 31827

Re: New array features

FB is a language that implements variables as boxes in memory that you can address, so I would expect a deep copy in FB, and that appears to be what happens. Python is more abstract and its variables do not work the same way. Also I notice in python (lists) that it seems to be a pointer copy also. T...
by caseih
Jul 14, 2019 4:53
Forum: General
Topic: Squares
Replies: 7358
Views: 442695

Re: Squares

Zlib uses the "deflate" compression algorithm, which is actually a combination of a couple of different common compression algorithms. It's well documented if you wish to learn more about it.
by caseih
Jul 06, 2019 1:57
Forum: Libraries
Topic: python experiment
Replies: 33
Views: 9976

Re: python experiment

Correct. ctypes is, in Python 3 at least, a built-in module. Python 3 is definitely faster than Python 2. If you're trying to do a lot of intensive math calculations in Python, you will be disappointed compared to compiled FB performance. However in the scientific and math community Python is often ...
by caseih
Jul 05, 2019 14:55
Forum: Libraries
Topic: python experiment
Replies: 33
Views: 9976

Re: python experiment

The final alternative is to create a Python function using the C API and have that function pass data between FB and Python. See https://stackoverflow.com/questions/13942128/how-to-pass-an-array-from-c-to-an-embedded-python-script. The SOF article speaks only about passing data to Python. You might...

Go to advanced search