string swap bug in QB4.5

Announce and discuss the progress of your various programming-related projects...programs, games, websites, tutorials, libraries...anything!
Post Reply
mikefromca
Coder
Posts: 41
Joined: Wed Oct 16, 2019 11:28 am

string swap bug in QB4.5

Post by mikefromca »

I noticed a rather strange QB bug that I can be able to reproduce. It affects QB 4.5 but not QuickBasic 1.1

This is the code that can successfully reproduce it every single time:

Code: Select all

type a
b as string * 6
c as string * 6
end type
dim d as a
swap d.b,d.c
And I can tell the problem is down to trying to exchange 2 6-byte string values with swap, because I introduced the command into another one of my programs and when i tried running it, the message at the bottom left was stuck on "binding" and sometimes the screen would either freeze up, or I get booted back to the DOS prompt without the IDE screen being erased first.
Post Reply