Search found 349 matches

by grindstone
Dec 17, 2017 1:00
Forum: Beginners
Topic: Functions in UDT with byref params
Replies: 8
Views: 200

Re: Functions in UDT with byref params

Good idea. Not a separate book, but splitting each item of the reference in a "general" and a (link to a) "details" section?
by grindstone
Dec 10, 2017 13:28
Forum: General
Topic: Range Check (feature request)
Replies: 46
Views: 508

Re: Range Check (feature request)

Munair wrote: Replacing "and" by "andalso" might speed up things a little.
Surprisingly not. Here (WinXP 32 / FB 1.05) "AndAlso" is even slightly slower.
by grindstone
Dec 09, 2017 11:19
Forum: Windows
Topic: Does anyone know what algo XP -> full screen DOS?
Replies: 84
Views: 1126

Re: Does anyone know what algo XP -> full screen DOS?

CGAMan wrote:will this work in legacy qb mode?
Alas, SCREENRES doesn't work in qb mode.
by grindstone
Dec 08, 2017 11:42
Forum: Windows
Topic: Does anyone know what algo XP -> full screen DOS?
Replies: 84
Views: 1126

Re: Does anyone know what algo XP -> full screen DOS?

I don't know exactly what you're intended to do, but maybe this link will help: http://www.dosgamers.com/dos/dosbox-dos-emulator/screen-resolution If you're interested I could offer you a snippet to do the keystrokes automatically (by freeBasic). Alternatively, have a look at https://www.freebasic.n...
by grindstone
Dec 07, 2017 12:56
Forum: General
Topic: Range Check (feature request)
Replies: 46
Views: 508

Re: Range Check (feature request)

Good idea, but I would prefer the syntax:

Code: Select all

a = &h42
if a = (&h41 to &h5A) then
  ...
and, additionally, analogue to SELECT:

Code: Select all

a = &h42
if a = (&h41,  &h49, &h53, &h5A) then
  ...

(Only my personal opinion)
by grindstone
Dec 07, 2017 11:48
Forum: Projects
Topic: compile-time bindgen for FB
Replies: 10
Views: 339

Re: compile-time bindgen for FB

To have a reliable working .h-to-.bi translator would be really great! Thought to the end this would mean that we could relinquish most of the .bi files of the FB installation packet. Although I've already translated some C headers (and some small programs, too) "by hand" I'm not sure if m...
by grindstone
Dec 06, 2017 11:22
Forum: Community Discussion
Topic: FreeBASIC Discussion December 2017
Replies: 28
Views: 1338

Re: FreeBASIC Discussion December 2017

FreeBasic covers the whole margin of needs from an absolute beginner to an advanced expert. It is open source and free, and the capability of accessing C - libraries makes it -at least in principle- appropriate for every purpose. The great amount of provided header files makes it capable to interact...
by grindstone
Dec 05, 2017 8:21
Forum: Tips and Tricks
Topic: Bubble Sort Alphabetize
Replies: 19
Views: 2876

Re: Bubble Sort Alphabetize

@BasicCoder2: Very interesting! :-)
by grindstone
Dec 05, 2017 8:09
Forum: General
Topic: (Z)String UTF8 Aware
Replies: 35
Views: 556

Re: ZSTRING UTF8 AWARE

There are UTF8 capabilities already implemented in the FB RTLIB, and the header file utf_conv.bi is contained in the FB installation. #Include Once "utf_conv.bi" Function UTF(s As String) As String Dim As String sUTF Dim As Integer numberOfBytes sUTF = String(Len(s) * 2, " ") Cha...
by grindstone
Nov 25, 2017 15:58
Forum: Windows
Topic: Why no QB compiler emulate CRT pixel aspect ratio?
Replies: 5
Views: 200

Re: Why no QB compiler emulate CRT pixel aspect ratio?

CGAMan wrote:Those old displays had a pixel that was 5x6 (meaning each pixel was 20% taller than it was wider).
Welcome to the forum.

I'm afraid your old CRT monitor was misalligned if it showed such a behaviour.
by grindstone
Nov 20, 2017 10:42
Forum: General
Topic: Objects & Static Event Handlers: How To Access Non-Static Members?
Replies: 23
Views: 392

Re: Objects & Static Event Handlers: How To Access Non-Static Members?

You have to pass instance as a pointer to the UDT, not as a UDT itself: Type TfMain extends fxTForm Private: SubMenuItem1 As fxTMenuItem SubMenuItem2 As fxTMenuItem SubMenuItem3 As fxTMenuItem SubMenuItem4 As fxTMenuItem Declare Static Sub SubMenuItem1_ClickHandler_(instance As TfMain Ptr) '<<<<<<<<...
by grindstone
Nov 19, 2017 19:02
Forum: Beginners
Topic: Compound conditional in IF statement
Replies: 12
Views: 336

Re: Compound conditional in IF statement

IMHO it considerably eases the typing of the FB source code that there's no closing statement.
by grindstone
Nov 18, 2017 14:04
Forum: Beginners
Topic: Reversing
Replies: 13
Views: 305

Re: Reversing

TurtleProgrammer wrote:Can, and if so, how can I write a HEX Editor of my own?
i don't know if you can do it, but it's surely possible. :-)
by grindstone
Nov 15, 2017 6:40
Forum: Hardware Interfaces / Communication
Topic: MyTerminal threads prog
Replies: 6
Views: 242

Re: MyTerminal threads prog

One little hint: You can use Continue Do instead of the GoTo - statement. Furthermore I would recommend to insert a Sleep 1 at the end of the loop for saving ressources: ' Thread for incoming data stream ' Runs in the background??? Sub commthread(param As Any Ptr) Print "mythread is running&quo...
by grindstone
Nov 13, 2017 14:32
Forum: Hardware Interfaces / Communication
Topic: MyTerminal threads prog
Replies: 6
Views: 242

Re: MyTerminal threads prog

Do you mean something like this?

Code: Select all

Dim As String sample
Open "xyz.csv" For Binary Access Read As #1
Seek #1, Lof(1) - 5000 'set file pointer to end-of-file - 5000
sample = Input(5000, #1) 'get the last 5000 bytes
Close #1

Go to advanced search