Search found 49 matches
- Thu Jan 15, 2026 5:04 pm
- Forum: Coding Questions
- Topic: PB 6.30 b6 - ReadStringFormat() seemingly unreliable?
- Replies: 8
- Views: 672
Re: PB 6.30 b6 - ReadStringFormat() seemingly unreliable?
How about making it available for other users?
Not sure this would be of use to anybody, but here it goes:
; Encode check methods
#ENCODING_CHECK_SLOW = 0
#ENCODING_CHECK_FAST = 1
; Identifies if the encoding of a file is UTF8 or ASCII
; by means of scanning the entire file or just the ...
- Wed Jan 14, 2026 1:49 pm
- Forum: Announcement
- Topic: PureBasic 6.30 is out !
- Replies: 183
- Views: 44259
Re: PureBasic 6.30 is out !
Thank you very much for this release Fred and team.
- Tue Jan 13, 2026 10:01 am
- Forum: Coding Questions
- Topic: PB 6.30 b6 - ReadStringFormat() seemingly unreliable?
- Replies: 8
- Views: 672
Re: PB 6.30 b6 - ReadStringFormat() seemingly unreliable?
Hi there,
IMHO everything is described in the help section for the command ReadStringFormat(). Please pay particular attention to the remarks section.
You're right, I had a completely wrong idea of what ReadStringFormat() does, this comes in part because I wrote a library to manage files a ...
- Mon Jan 12, 2026 10:30 am
- Forum: Coding Questions
- Topic: PB 6.30 b6 - ReadStringFormat() seemingly unreliable?
- Replies: 8
- Views: 672
Re: PB 6.30 b6 - ReadStringFormat() seemingly unreliable?
You need to write the BOM label, then it will be read.
WriteStringFormat()
https://www.purebasic.fr/english/viewtopic.php?p=478874
https://www.purebasic.fr/english/viewtopic.php?p=617388#p617388
Thanks for replying.
Problem with BOM is that I receive files from 3rd parties and they sometimes ...
- Mon Jan 12, 2026 2:22 am
- Forum: Coding Questions
- Topic: PB 6.30 b6 - ReadStringFormat() seemingly unreliable?
- Replies: 8
- Views: 672
PB 6.30 b6 - ReadStringFormat() seemingly unreliable?
ReadStringFormat() seems to be unreliable, is this a bug? Am I doing something wrong? Can someone else confirm?
If the below code is run:
Define string.s="9.9.9.9,áéíóúñ,XX,2025"
Define file.i
Define format.i
file = CreateFile(#PB_Any, "test.txt", #PB_UTF8)
If file
WriteString(file, String ...
If the below code is run:
Define string.s="9.9.9.9,áéíóúñ,XX,2025"
Define file.i
Define format.i
file = CreateFile(#PB_Any, "test.txt", #PB_UTF8)
If file
WriteString(file, String ...
- Tue Jan 06, 2026 1:47 am
- Forum: Bugs - Linux
- Topic: [Done] PB 6.30 b6 - ProgramExitCode() seemingly fails -1 randomly
- Replies: 6
- Views: 859
Re: PB 6.30 b6 - ProgramExitCode() seemingly fails -1 randomly
Thank you so much Fred!
- Fri Jan 02, 2026 12:44 pm
- Forum: Bugs - Linux
- Topic: Doesn't work properly on mutli-screen
- Replies: 2
- Views: 352
Re: Doesn't work properly on mutli-screen
Are you really using version 15.10? Isn't that a bit ancient for PB? Or do you mean 25.10?
I use Arch with two monitors with multiple computers, Intel and AMD graphics cards (no Nvidia) and never noticed any problems with multi-monitor and the IDE, I think I can hook a 3rd monitor to one of the ...
I use Arch with two monitors with multiple computers, Intel and AMD graphics cards (no Nvidia) and never noticed any problems with multi-monitor and the IDE, I think I can hook a 3rd monitor to one of the ...
- Mon Dec 22, 2025 1:05 pm
- Forum: Bugs - Linux
- Topic: [Done] PB 6.30 b6 - ProgramExitCode() seemingly fails -1 randomly
- Replies: 6
- Views: 859
Re: PB 6.30 b6 - ProgramExitCode() seemingly fails -1 randomly
I have noticed a few bizarre things about this issue.
Sometimes it causes compiled programs to segfault, but I can't reproduce it consistently it is very random.
When running a compiled program via sudo that calls another compiled program ("sudo program1" runs "program2") with no tty it fails 100 ...
Sometimes it causes compiled programs to segfault, but I can't reproduce it consistently it is very random.
When running a compiled program via sudo that calls another compiled program ("sudo program1" runs "program2") with no tty it fails 100 ...
- Thu Dec 18, 2025 10:51 am
- Forum: Bugs - Linux
- Topic: [Done] PB 6.30 b6 - ProgramExitCode() seemingly fails -1 randomly
- Replies: 6
- Views: 859
Re: [PB 6.30b5] ProgramExitCode() seemingly fails -1 randomly
Problem still happens with PB 6.30b6
- Fri Dec 12, 2025 3:47 pm
- Forum: Bugs - Linux
- Topic: [Done] PB 6.30 b6 - ProgramExitCode() seemingly fails -1 randomly
- Replies: 6
- Views: 859
Re: [PB 6.30b5] ProgramExitCode() seemingly fails -1 randomly
Thank you so much for checking.PeDe wrote: Fri Dec 12, 2025 3:15 pm PB v6.30b5 arm64, Raspberry Pi OS (Trixie), P500
Aborted with -1 after 1300 runs. Then I inserted a delay(100) into the repeat loop, and the code aborted after 8752 runs.
Peter
- Fri Dec 12, 2025 2:32 pm
- Forum: Bugs - Linux
- Topic: [Done] PB 6.30 b6 - ProgramExitCode() seemingly fails -1 randomly
- Replies: 6
- Views: 859
[Done] PB 6.30 b6 - ProgramExitCode() seemingly fails -1 randomly
I can reproduce this in PB6.20, PB6.21 and PB6.30 beta 6 on Xubuntu18.04, Arch and Debian 12/13
The ProgramExitCode() function returns -1 at random, the shell program executes correctly, both stderr and stdout appear to be captured correctly however ProgramExitCode() throws a -1 at the exit code ...
The ProgramExitCode() function returns -1 at random, the shell program executes correctly, both stderr and stdout appear to be captured correctly however ProgramExitCode() throws a -1 at the exit code ...
- Mon Sep 22, 2025 8:09 pm
- Forum: Bugs - Linux
- Topic: [Done] PB 6.21 Regresion in console output behaviour
- Replies: 5
- Views: 2709
Re: [PB 6.21] Regresion in console output behaviour
Thank you so much Fred, much, much appreciated.
- Mon Jul 07, 2025 10:19 am
- Forum: Coding Questions
- Topic: [PB 6.21] Wrong precision on the integer part of floats
- Replies: 2
- Views: 492
Re: [PB 6.21] Wrong precision on the integer part of floats
No Bug.
Floats have only 24 significant bits, which means you can store integer numbers just until ~ 16 mio.
Your integer number needs more than 26 bits, so the last binary digits are lost during your calculation and the number (even the integer part) becomes inaccurate.
You can use Double, they ...
Floats have only 24 significant bits, which means you can store integer numbers just until ~ 16 mio.
Your integer number needs more than 26 bits, so the last binary digits are lost during your calculation and the number (even the integer part) becomes inaccurate.
You can use Double, they ...
- Mon Jul 07, 2025 12:47 am
- Forum: Coding Questions
- Topic: [PB 6.21] Wrong precision on the integer part of floats
- Replies: 2
- Views: 492
[PB 6.21] Wrong precision on the integer part of floats
I do understand that the decimal part of floats can be iffy but the integer part failing like this looks way too iffy to me.
Define measure.f = 25.0
Define value.q = 60
Define result.f = 73713600.0
result + (measure * value)
Debug(result)
; Prints 73715104.0 (incorrect)
Define measureb ...
Define measure.f = 25.0
Define value.q = 60
Define result.f = 73713600.0
result + (measure * value)
Debug(result)
; Prints 73715104.0 (incorrect)
Define measureb ...
- Tue Jun 17, 2025 3:38 am
- Forum: Bugs - Linux
- Topic: [Done] PB 6.21 Regresion in console output behaviour
- Replies: 5
- Views: 2709
[Done] PB 6.21 Regresion in console output behaviour
There has been some kind of regresion/bug in how the output to the console is handled in PB6.21
The following code in PB6.20 allows you (using the arrow keys) to move the console's cursor inside the console window without filling it with garbage:
EnableExplicit
#CONSOLE_CODE_CURSOR_UP = Chr(27 ...
The following code in PB6.20 allows you (using the arrow keys) to move the console's cursor inside the console window without filling it with garbage:
EnableExplicit
#CONSOLE_CODE_CURSOR_UP = Chr(27 ...