• Print

Author Topic: QBDbase v1.4  (Read 2216 times)

iamdenteddisk

  • Hero Member
  • *****
  • Posts: 2737
    • Email
Re: QBDbase v1.35
« Reply #105 on: October 31, 2012, 09:55:00 PM »
agreed Steve, I was hoping you would understand my comment there, it was in no way meant to be negative..

pat on the back and all man..very nice work "really" kudo's .

I am just so happy to say, I am a believer. anyone who put's in the effort to learn to use qb64 will have their day in the sun youknow.  I try to make special concession that all the new guy's at least hear they can do it to.. from there believing till they see it is up to them.. ;)


SMcNeill

  • Hero Member
  • *****
  • Posts: 2414
    • Email
Re: QBDbase v1.4
« Reply #106 on: October 31, 2012, 10:24:40 PM »
Additional minor update:

It's been a good (but sleepless) night.  :)

Added a new command to our list of QBDbase abilities: ClearTypeMem

What this command does is simply clear our database reference variable all at once.

For example:

MyDB holds the elements:  invalid as _byte, name as string * 10, age as _unsigned _byte, and sex as string *1.

We write one record to the database:
Code: [Select]
MyDB.name = "Bob"
MyDB.age = 12
MYDB.sex = "N"
WriteData x, 0

Now, say we want to add another person to the database, but we don't know much about them.  We want to add Stacy, but we don't know their age, or even sex (Stacy is an uni-sex name.  I've met both male and female Stacys.)

As it was, we'd have to:
Code: [Select]
MyDB.name = "Stacy"
MyDB.age = 0
MyDB.Sex = ""
WriteData x, 0

Now, with the new command, we can do it like this:
Code: [Select]
ClearTypeMem x
MyDB.name = "Stacy"
WriteData x, 0

It might not seem so useful in this little example, but imagine if we had a database with 100 fields...   Why go in and set them all back to nothing one by one, when with this little command you can set them all back to blank at once!

It's just a lazy short-cut command, and I like those type of things personally.  The less I have to do, the happier I am.  :D
http://bit.ly/TextImage -- Library of QB64 code to manipulate text and images, as a BM library.
http://bit.ly/Color32 -- A set of color CONST for use in 32 bit mode, as a BI library.

http://bit.ly/DataToDrive - A set of routines to quickly and easily get data to and from the disk.  BI and BM files

SMcNeill

  • Hero Member
  • *****
  • Posts: 2414
    • Email
Re: QBDbase v1.4
« Reply #107 on: November 05, 2012, 02:09:42 PM »
Guys, I think v1.4 is going to be the stable version for a while, without any more updates for a bit.

I want to add variable length strings to QBDbase sometime, but at the moment I just can't get it up and going easily.  _MEM itself doesn't quite work right with strings (it's been reported, but I don't know when Galleon will get it working), and I really don't want to tie us into a binary file on the hard drive to make it work.  It kind of seems like it'd defeat the purpose of how we're doing things here -- QBDbase runs from memory so we don't need to access the drive, but to read/write variable length strings we'd need to use the hard drive....

I'd suggest using QBDbase as it is, and the Simple Data to Drive routines for storing variable length strings for now.  They're detailed in the Sample section of the forums, and the library file for them can be downloaded from my signature.  :)

There's a few things I still want to work on sometime (dbf file support, single field export options), but nothing pressing.  The next changes I make will probably come after we get the next GL version of QB64 and people switch over to using it as the standard.  GL and SDL use different MEM.TYPEs and such, so I've been waiting for the full GL version before I try and expand any more capabilities into the library.

If anyone has issues, encounters bugs, or sees where I need to improve or change something let me know.  It seems quite stable from my testing, but I won't guarantee that you won't find something I've overlooked.   As it stands now though, 1.4 is going to be the last version -- PRE GL -- except for some minor bug fixes or tweaks.  :)
http://bit.ly/TextImage -- Library of QB64 code to manipulate text and images, as a BM library.
http://bit.ly/Color32 -- A set of color CONST for use in 32 bit mode, as a BI library.

http://bit.ly/DataToDrive - A set of routines to quickly and easily get data to and from the disk.  BI and BM files

TerryRitchie

  • Hero Member
  • *****
  • Posts: 2264
  • FORMAT C:\ /Q /U /AUTOTEST (How to repair Win8)
    • Email
Re: QBDbase v1.4
« Reply #108 on: November 05, 2012, 04:32:50 PM »
Ok, cool.  I'm going to start using your library in my project.  If I have questions (translated I'll probably need help) I'll give you a holler.

Clippy

  • Hero Member
  • *****
  • Posts: 16440
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: QBDbase v1.4
« Reply #109 on: November 06, 2012, 12:02:34 AM »
Stable for a while? Does it deteriorate over time?  :D
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

  • Print