Search found 58 matches
- Mar 03, 2024 21:21
- Forum: Linux
- Topic: FB syntax highlighting for GtkSourceView based editors: Xed, Pluma, GEdit, etc.
- Replies: 1
- Views: 297
Re: FB syntax highlighting for GtkSourceView based editors: Xed, Pluma, GEdit, etc.
nice, i'm looking to switch to neo vim for an ide and i been looking around for something like this for tree sitter, I might have to make my own but i could use this as a reference!
- Mar 03, 2024 21:11
- Forum: Sources, Examples, Tips and Tricks
- Topic: Just for fun: color illusion
- Replies: 1
- Views: 264
- Mar 03, 2024 20:40
- Forum: Sources, Examples, Tips and Tricks
- Topic: A mem copy function for allocated memory and datatypes
- Replies: 0
- Views: 356
A mem copy function for allocated memory and datatypes
I was testing different ways to copy data types and bench marking them. I came up with a new way to copy memory faster then byte by byte chunks. I have included a byte by byte mem copy along with the faster copy function. of course you can't copy strings unless they have a defined size. I use this t...
- Mar 02, 2024 22:31
- Forum: Sources, Examples, Tips and Tricks
- Topic: my newest bits read / write
- Replies: 2
- Views: 361
Re: my newest bits read / write
cool! i'm inspired :D here is some code that i made for a personal use datatype. the uDecimal datatype, unsigned decimal that can hold values from 0.0 to 18446744073709551615.999999999999999999 I have some operators and cast functions made for it but it's incomplete ( not full feature datatype ) but...
- Mar 02, 2024 19:26
- Forum: General
- Topic: [solved]UDT and procptr
- Replies: 3
- Views: 615
Re: [solved]UDT and procptr
I also figured out how to send parameters to the function. type test_func_ptr declare function nex(ttt as long) as ulongint declare function pre(ttt as long) as ulongint declare function set_next() as ulongint declare function set_prev() as ulongint dim get_data as function(Byref As test_func_ptr, t...
- Mar 02, 2024 19:02
- Forum: General
- Topic: [solved]UDT and procptr
- Replies: 3
- Views: 615
Re: UDT and procptr
ok, that's interesting and what I needed.
Thanks fxm!
Thanks fxm!
- Mar 02, 2024 17:04
- Forum: General
- Topic: [solved]Help with UDT and cptr
- Replies: 4
- Views: 656
Re: [solved]Help with UDT and cptr
ok, that explains it,
- Mar 02, 2024 16:44
- Forum: General
- Topic: [solved]UDT and procptr
- Replies: 3
- Views: 615
[solved]UDT and procptr
What am i doing wrong here? im using FreeBASIC-1.10.0-winlibs-gcc-9.3.0 type test_func_ptr declare function nex() as ulongint declare function pre() as ulongint declare function set_next() as ulongint declare function set_prev() as ulongint dim get_data as function() as ulongint end type function te...
- Mar 01, 2024 20:13
- Forum: General
- Topic: [solved]Help with UDT and cptr
- Replies: 4
- Views: 656
Re: Help with UDT and cptr
yup that fixed it!!
Thank you!
SamL
Thank you!
SamL
- Mar 01, 2024 19:58
- Forum: General
- Topic: [solved]Help with UDT and cptr
- Replies: 4
- Views: 656
[solved]Help with UDT and cptr
im using FreeBASIC-1.10.0-winlibs-gcc-9.3.0 Some of my older code is not working i think its because I updated the compiler. I'm copying UDT values into allocated memory. then i want one of the values from the memory i would just use: some_var = *cptr(UDT ptr, some_pointer).some_UDT_fieldname but th...
- Feb 27, 2023 21:32
- Forum: General
- Topic: [solved] Using @this inside constructor as sub call parameter
- Replies: 2
- Views: 406
Re: Using @this inside constructor as sub call parameter
Thanks Fxm! yes, I was messing around with it and there was no example of using @this in the manual, though it mentioned this The This parameter can be used just like any other variable, ie., pass it to procedures taking an object of the same type, call other member procedures and access member data...
- Feb 27, 2023 18:15
- Forum: General
- Topic: [solved] Using @this inside constructor as sub call parameter
- Replies: 2
- Views: 406
[solved] Using @this inside constructor as sub call parameter
Hi everyone! its been a while and I.m still plinking away at my code :D OK I want to launch a thread from the constructor of a UDT, and I also want the thread to have access to the UDT. So i used @this inside the constructor to pass the UDT's pointer to the threadcreate() function. Is it safe to use...
- Feb 17, 2022 16:28
- Forum: General
- Topic: when does FileFlush() return?
- Replies: 6
- Views: 623
Re: when does FileFlush() return?
FileFlush() looks like the best i can do and its pretty good command. Calling it often will slow down the code I did see in the C Standard Library Functions here https://www.freebasic.net/wiki/ProPgCruntime#LOLEVIO there is _close(handle as integer) as integer Close a file opened for unbuffered I/O....
- Feb 15, 2022 20:36
- Forum: General
- Topic: Uinteger<32>
- Replies: 14
- Views: 1158
Re: Uinteger<32>
nice Defines.
it would be nice to have a uint128, I'm sure I could find some where to use it.
it would be nice to have a uint128, I'm sure I could find some where to use it.
- Feb 15, 2022 20:25
- Forum: General
- Topic: when does FileFlush() return?
- Replies: 6
- Views: 623
when does FileFlush() return?
The goal is to guarantee data is on the disk before continuing in case of a power loss so any corruption can be undone. I'm learning how to use FileFlush(filenum,1) and have a question. I turned off my system buffer for my HDD in windows, Device manager>Disk drives>(my drive)>properties>Policies, un...