Search found 5521 matches

by mk-soft
Fri Feb 27, 2026 6:10 pm
Forum: Bugs - Windows
Topic: [Done] PB v6.40 B1 SYS_FreeStructureStrings
Replies: 2
Views: 60

Re: PB v6.40 B1 SYS_FreeStructureStrings

Could reduce the code. Due to threaded structures


Structure udtFoo
iVal.i
sVal.s
EndStructure

Threaded varFoo.udtFoo



//
// PureBasic 6.40 beta 1 - C Backend (MacOS X - x64) generated code
//
// (c) 2026 Fantaisie Software
//
// The header must remain intact for Re-Assembly ...
by mk-soft
Fri Feb 27, 2026 5:25 pm
Forum: Bugs - Windows
Topic: [Done] PB v6.40 B1 SYS_FreeStructureStrings
Replies: 2
Views: 60

[Done] PB v6.40 B1 SYS_FreeStructureStrings

Works with PB v6.40 Alpha 4 and Beta 1 ASM-Backend. Same on macOS

Module ThreadToGUI

Link En: http://www.purebasic.fr/english/viewtop ... 12&t=66180

C-Backend

---------------------------
PureBasic - Assembler error
---------------------------
error: implicit declaration of function 'SYS ...
by mk-soft
Fri Feb 27, 2026 5:08 pm
Forum: Bugs - Mac OSX
Topic: [Done] PB v6.40 B1 SYS_FreeStructureStrings
Replies: 1
Views: 41

[Done] PB v6.40 B1 SYS_FreeStructureStrings

Module ThreadToGUI

Link En: http://www.purebasic.fr/english/viewtopic.php?f=12&t=66180


PureBasic - Assembler error

error: call to undeclared function 'SYS_FreeStructureStrings'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
3796 | SYS ...
by mk-soft
Fri Feb 27, 2026 4:48 pm
Forum: Bugs - Mac OSX
Topic: examples: impossible to open a 800*600 32- bit screen
Replies: 5
Views: 96

Re: examples: impossible to open a 800*600 32- bit screen

Update for macOS with function EnterWindowFullscreen
You can swap screens with Ctrl-Left and Ctrl-Right
by mk-soft
Fri Feb 27, 2026 3:03 pm
Forum: Bugs - Mac OSX
Topic: examples: impossible to open a 800*600 32- bit screen
Replies: 5
Views: 96

Re: examples: impossible to open a 800*600 32- bit screen

Not at my Mac right now.

PB Example adapted...
A window in max size without a border.

Update for macOS with function EnterWindowFullscreen
You can swap screens with Ctrl-Left and Ctrl-Right



; ------------------------------------------------------------
;
; PureBasic - Window 3D
;
; (c ...
by mk-soft
Thu Feb 26, 2026 10:52 am
Forum: Bugs - Mac OSX
Topic: examples: impossible to open a 800*600 32- bit screen
Replies: 5
Views: 96

Re: examples: impossible to open a 800*600 32- bit screen

It is best to fill OpenScreen with the monitor resolution, 32-bit colour depth and all optional parameters.
by mk-soft
Wed Feb 25, 2026 9:54 am
Forum: Coding Questions
Topic: Passing string paramerter by reference to a procedure
Replies: 14
Views: 4027

Re: Passing string paramerter by reference to a procedure

There is only one method to pass strings as byref to a procedure. As a structure with the pointer to the string.



Procedure foo(*inout.string)
*inout\s + " World!"
EndProcedure

Define text.string ; <- Define String Pointer Structure

text\s = "Hello"
Debug SizeOf(text) ; Is a pointer to the ...
by mk-soft
Wed Feb 25, 2026 9:38 am
Forum: Coding Questions
Topic: Passing string paramerter by reference to a procedure
Replies: 14
Views: 4027

Re: Passing string paramerter by reference to a procedure

This is completely wrong here. You transfer the pointer to the string and not the pointer to the string pointer.
Thus, you write in a wrong storage area.
by mk-soft
Wed Feb 25, 2026 9:27 am
Forum: Feature Requests and Wishlists
Topic: Some additional string library functions
Replies: 6
Views: 189

Re: Some additional string library functions

In version PB v6.40 Alpha there will be no string inplace. Has also been removed in ReplaceString.
by mk-soft
Tue Feb 24, 2026 4:55 pm
Forum: Coding Questions
Topic: StringGadget & onchange event
Replies: 6
Views: 138

Re: StringGadget & onchange event

I have set my hand scanner to send me an end of text signal. (#ETX$)


;-TOP

Procedure UpdateWindow()
Protected dx, dy
dx = WindowWidth(0)
dy = WindowHeight(0) - StatusBarHeight(0) - MenuHeight()
; Resize Gadgets
EndProcedure

Procedure Main()
Protected dx, dy, temp.s

#WinStyle = #PB ...
by mk-soft
Mon Feb 23, 2026 9:23 am
Forum: Tricks 'n' Tips
Topic: modbus-server-tcpip
Replies: 10
Views: 344

Re: modbus-server-tcpip

Under Linux, there is a lockout period before the same server port can be used again. One minute may be too long.
However, I believe this has been shortened in the new version of PureBasic.
I will add a note that root privileges are required under Linux.
Under Linux, root privileges are required for ...
by mk-soft
Sun Feb 22, 2026 1:47 pm
Forum: Tricks 'n' Tips
Topic: modbus-server-tcpip
Replies: 10
Views: 344

Re: modbus-server-tcpip

Update v1.02.2
- Added string to modbus registers
by mk-soft
Sun Feb 22, 2026 12:45 pm
Forum: Feature Requests and Wishlists
Topic: Variable by reference in procedure
Replies: 36
Views: 6190

Re: Variable by reference in procedure

You don't need an extra structure

Code: Select all

Procedure foo(*inout.string)
  *inout\s + " World!"
EndProcedure

Define text.string

text\s = "Hello"
foo(text)
Debug text\s
by mk-soft
Sat Feb 21, 2026 1:08 pm
Forum: Tricks 'n' Tips
Topic: modbus-server-tcpip
Replies: 10
Views: 344

modbus-server-tcpip

After a request from the German forum, I wrote a new basic for a Modbus Server.

Link: https://github.com/mk-soft-65/modbus-server-tcpip

Modbus Server and Data Source Basis

The Modbus server and data source thread run asynchronously. To ensure data consistency, they must be mutually protected ...