Search found 11960 matches
- Mar 26, 2024 17:25
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 227
- Views: 20551
Re: Freebasic 1.20.0 Development
Why not just use: #define C chr(0) Because const has higher operational efficiency :D Indeed, "Constants" have similar visibility rules than variables for Namespace blocks, Type blocks, and compound block statements, while "Defines" are only scoped inside compound block statemen...
- Mar 26, 2024 13:15
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 227
- Views: 20551
Re: Freebasic 1.20.0 Development
Why not just use:
#define C chr(0)
#define C chr(0)
- Mar 26, 2024 12:04
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 227
- Views: 20551
Re: Freebasic 1.20.0 Development
St_W wrote: ↑Dec 17, 2011 21:59 Automated recent git builds at:
https://users.freebasic-portal.de/stw/builds/
- Mar 25, 2024 17:00
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 227
- Views: 20551
Re: Freebasic 1.20.0 Development
Jeff, Back to : Pass Byref to a function, Return Byref from a function Assignment of the 3 types of string ( 'String' , 'String * N' , 'Zstring * N+1' ) by calling 2 types of function ( 'Byref As String' , 'Byref As Zstring' ): - either passing by reference to the function, - or returning by refere...
- Mar 25, 2024 7:23
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 227
- Views: 20551
Re: Freebasic 1.20.0 Development
The test-suite has some tests for [L|R]TRIM, however does not specifically test behaviours with CHR(0) either for the string argument or the filter argument. I think behaviour should be changed - however, there are several places internally where the rtlib uses common functions to scan a string for...
- Mar 24, 2024 9:58
- Forum: Documentation
- Topic: SmartPointer_UDTname_ segmentation violation
- Replies: 10
- Views: 368
Re: SmartPointer_UDTname_ segmentation violation
Documentation updated: ProPgOperatorOverloading → fxm [added in last example a workaround for a bug in fbc versions 1.10.0/1.10.1] This is due to a bad code generation for an argument passed to a 'Byval UDT Ptr' parameter when a specific conversion environment is encountered. The workaround consist...
- Mar 23, 2024 16:39
- Forum: Documentation
- Topic: SmartPointer_UDTname_ segmentation violation
- Replies: 10
- Views: 368
Re: SmartPointer_UDTname_ segmentation violation
Well done Jeff. Otherwise I had already seen another configuration which presents the same behavior: const SHOW_CHANGE = true type ROOT extends object Declare Constructor (Byref _name As String = "") #if SHOW_CHANGE Declare Operator Let (Byref rhs As root) '' same behavior with: Declare Co...
- Mar 23, 2024 10:02
- Forum: Documentation
- Topic: SmartPointer_UDTname_ segmentation violation
- Replies: 10
- Views: 368
Re: SmartPointer_UDTname_ segmentation violation
THANK YOU This "segmentation violation" signal only appears since version 1.10.0 of fbc. The simple change: Sub PrintInfo ( ByVal ByRef p As root Ptr) is enough to correct it (otherwise, the value of the pointer passed is polluted!!!). I will try to isolate/simplify this abnormal behavior,...
- Mar 22, 2024 16:54
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 227
- Views: 20551
Re: Freebasic 1.20.0 Development
Indeed, for very simple UDT with for example only numeric member fields without initializers: - the compiler does not add an implicit constructor but only allocates memory set to 0, - the compiler does not add an implicit copy-constructor but only performs a shallow (bitwise) copy, - the compiler do...
- Mar 22, 2024 6:12
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 227
- Views: 20551
Re: Freebasic 1.20.0 Development
There are cases where there are no constructors or copy-constructors or destructors (neither explicit nor implicit).
- Mar 21, 2024 19:23
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 227
- Views: 20551
Re: Freebasic 1.20.0 Development
Even I am still learning about some keyword behaviors: For compatibility with QBasic, Lset can also copy a user defined type variable into another one. The copy is made byte for byte, without any care for fields or alignment. It's up to the programmer to take care for the validity of the result. [/i]
- Mar 20, 2024 19:31
- Forum: General
- Topic: wth -- Thread time .vs Subroutine time
- Replies: 211
- Views: 37681
Re: wth -- Thread time .vs Subroutine time
Thread synchronization is a fairly complex and very delicate subject to avoid all cases of blocking or asynchronism which are difficult both to highlight and to investigate.
This first requires great coding rigor.
This first requires great coding rigor.
- Mar 20, 2024 19:21
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 227
- Views: 20551
Re: Freebasic 1.20.0 Development
BUG #3 with new STRING*N LSET and RSET overflow the fix-len string field by always writing a null ubyte just after the last character of the fix-len string. I assume LSET and RSET have not been updated for the new STRING*N . Example (result NOT OK): Type UDT Field = 1 Dim As String * 5 s1 Dim As St...
- Mar 20, 2024 10:28
- Forum: Community Discussion
- Topic: Bugs
- Replies: 115
- Views: 20847
Re: Bugs
I updated the bug report dedicated of that 'Byval' use, but for a 'Byval' parameter:
#830 Byval placed before a passed variable for a Byval parameter induces an incomplete copy construction
#830 Byval placed before a passed variable for a Byval parameter induces an incomplete copy construction
- Mar 19, 2024 16:13
- Forum: Community Discussion
- Topic: Bugs
- Replies: 115
- Views: 20847
Re: Bugs
By specifying the 'Byval' keyword in front of an argument to a 'ByRef' parameter (or in front of a function result returned 'Byref' ), a value usually stored in a pointer, can be passed directly as-is as an address, forcing the 'Byref' parameter (or 'Byref' function result) to reference the memory l...