Greetings to everybody!
Just a newbie to FB,and curious can pointer in FB do everything that c does?
Thanks for the help in advance.
Peter
Pointer in FB
Re: Pointer in FB
And,can anybody here guide me what's the better(structural way) to learn FB under Windows,from 0 to intermediate level ?Thanks again.
Re: Pointer in FB
Hello,
Why not to start by studying the latest FreeBASIC manual?
Why not to start by studying the latest FreeBASIC manual?
Code: Select all
FB-manual-1.09.0.chm
-
- Posts: 4309
- Joined: Jan 02, 2017 0:34
- Location: UK
- Contact:
Re: Pointer in FB
Not able to answer that.PeterHu wrote:can pointer in FB do everything that c does?
However, here are two excellent tutorials on FB pointers.
Pointer Data Type
Pointers and Composite Types
Re: Pointer in FB
Basically, yes, because they work in the same way.
The main difference with C is about arrays pointers (since in FreeBasic they point to the descriptor, not to the actual data) and string pointers (since strings are managed differently in FreeBasic and in C)
There are simple workarounds in both cases, like using a pointer to the first element of the array or to the first character of a string, and also, FreeBasic can use c-like arrays or strings (with zstring PTR)
Re: Pointer in FB
Many thanks to all of you!
Re: Pointer in FB
You can look in the Comparison of C/C++ and FreeBASIC documentation page some types of syntaxe comparisons relating to pointers.