Search found 849 matches

by grindstone
Jun 02, 2022 8:52
Forum: General
Topic: Sugesstion String Split in FB
Replies: 5
Views: 852

Re: Sugesstion String Split in FB

This job can be done with just a few lines of code. No need for a new FB feature. Function SplitString(StringToSplit As String = "", array() As String) As UInteger Dim As String text = StringToSplit 'remind StringToSplit as working copy Dim As UInteger b = 1, e = 1 'pointer to text, begin ...
by grindstone
May 29, 2022 15:10
Forum: General
Topic: Can someone recommend a text editor for Android?
Replies: 7
Views: 732

Re: Can someone recommend a text editor for Android?

Thank you for the hints. I'm looking for something like that since a long time. I've installed that app and it works. :P
I wonder if I could get my old WIN95 working with aFreeBox.
by grindstone
Apr 21, 2022 11:43
Forum: Beginners
Topic: How to use INPUT() to read the entire content of a text document
Replies: 5
Views: 1224

Re: How to use INPUT() to read the entire content of a text document

Not sure what you intend to do nor what exactly your problem is, but have a look at this modified sample from https://www.freebasic.net/wiki/KeyPgEncoding '' This example will: '' 1) Write a string to a text file with utf-16 encoding '' 2) Display the byte contents of the file '' 3) Read the text ba...
by grindstone
Apr 17, 2022 8:18
Forum: Windows
Topic: OPEN PIPE alternatives
Replies: 3
Views: 947

Re: OPEN PIPE alternatives

Have a look at https://users.freebasic-portal.de/grind ... /bipipe.bi, function bipOpen. Use SW_MINIMIZE as showmode value.
by grindstone
Apr 09, 2022 9:53
Forum: General
Topic: Communicate with other program (solved)
Replies: 12
Views: 1306

Re: Communicate with other program

Pipes are communication channels between programs. To see how they they work have a look at one of my "babies", the Colochessum chess engine testing and evaluating program. The pipe stuff is coded in the bipipe.bi library. To see how the procedures are used search them in the colochessum.b...
by grindstone
Apr 08, 2022 13:51
Forum: Beginners
Topic: How can I convert zstring ptr to standard string
Replies: 16
Views: 2824

Re: How can I convert zstring ptr to standard string

Some time ago I tried something similar, exchanging the text of a string variable by writing the pointer to another text into the string descriptor. It worked quite well, but when I tried to write a new text to the string variable without changing everything back, the program crashed. It seems that ...
by grindstone
Mar 29, 2022 12:25
Forum: Beginners
Topic: Text on screen
Replies: 15
Views: 1910

Re: Text on screen

@PhiltheBear: That's the great of freeBasic, and the main reason why I like it: It is both simple and sophisticated, just as you want. For an absolute beginner it takes less than 10 minutes to get a "Hello world" printout, on the other hand you could write an operating system with it. Codi...
by grindstone
Mar 14, 2022 14:11
Forum: General
Topic: FreeBasic Quirk
Replies: 15
Views: 2070

Re: FreeBasic Quirk

newby12 wrote: Mar 13, 2022 1:26 I was playing with numeric strings and found a bug in FB
As you see, it's not a bug, it's a feature! :D
by grindstone
Mar 03, 2022 15:20
Forum: General
Topic: Sawtooth Generator to WAV File
Replies: 4
Views: 678

Re: Sawtooth Generator to WAV File

The # is a relic of old QBasic times, in FB it's not needed but still accepted for downward compatibility. It's up to you to use it or not.
by grindstone
Mar 01, 2022 10:35
Forum: Community Discussion
Topic: On permanent banning
Replies: 35
Views: 3844

Re: On permanent banning

But what use could it have to create a second account if you don't post anything there?
by grindstone
Feb 26, 2022 10:52
Forum: General
Topic: White noise generator
Replies: 19
Views: 1334

Re: White noise generator

Just a suggestion: What about the reverse way? A noise source at the input of the audio device. This way a true RNG could be implemented that could never be hacked.
by grindstone
Feb 24, 2022 12:17
Forum: Community Discussion
Topic: Observations.
Replies: 138
Views: 15542

Re: Observations.

dodicat wrote: Feb 24, 2022 11:33...unless world war three starts of course.
Speak of the devil and the devil shows up!

My 2 cents to jj2007: To ban him permanently was an overreaction and should be corrected, IMHO
by grindstone
Feb 22, 2022 11:56
Forum: Community Discussion
Topic: Revamping the forum?
Replies: 129
Views: 20648

Re: Revamping the forum?

St_W wrote: Feb 21, 2022 21:18some quick button to say thanks / like / vote up a post or similar.
I'd endorse that.
by grindstone
Feb 19, 2022 14:01
Forum: Windows
Topic: How to use WinMain with FreeBASIC?
Replies: 9
Views: 1396

Re: How to use WinMain with FreeBASIC?

Try searching the forum for "hinstance" and you get over a thousand results! Do you really consider this hint helpful? @ operator+ In FB it's quite simple: #Include "windows.bi" MessageBoxW(NULL, "First Program", "First", MB_OK) The rest of the work does the ...
by grindstone
Nov 29, 2021 11:24
Forum: General
Topic: Rotate bits in a byte
Replies: 6
Views: 2439

Re: Rotate bits in a byte

Another approach: Function rolb4(value As UByte) As UByte Dim As UByte temp = value Shl 1 temp = IIf(Bit(value, 3), BitSet(temp, 0), BitReset(temp, 0)) Return (value And &b11110000) Or (temp And &b00001111) End Function Function rorb4(value As UByte) As UByte Dim As UByte temp = value Shr 1 ...