Small Basic Featured Program – Program Database

This was a challenge to write a database program with Small Basic.  I started to write this program in June last year in a Challenge of the Month.  But suspended because of Combo Box coding.  Code of Combo Box has been completed last month.  Then I restarted to write my database program and reported about the program to a thread in Small Basic forum.  Ed Price made this thread sticky.  Thanks Ed.

This project is still beta but I will introduce it as current status.

This project has three components. One for deciding folders to search.  One for collecting information from Small Basic source programs and create a CSV database.  And the last one is to select data from the CSV database.  Following list shows the latest versions of the components.

  1. Program Folder Manager 0.41 - CRK000-2
  2. Program Scanner 0.3b - PMG585-1
  3. Program Database 0.5b - HMK932-1

Program Folder Manager

This program creates a file ProgramScanner.settings.  This setting file contains an array of folders to be scanned by Program Scanner.  An array roots is given to this program (lines 13 - 15 below).  And this program gets all sub folders.

 1.' Program Folder Manager 0.41
 2.' Copyright © 2014-2015 Nonki Takahashi. The MIT License.
 3.' Repository
 5.' History:
 6.' 0.41 2015-12-16 #2 Changed for Windows 10. (CRK000-2)
 7.' 0.3 2014-06-13 Supported sub folders. (CRK000-1)
 8.' 0.2 2014-06-06 Added other folders. (CRK000-0)
 9.' 0.1 2014-06-04 Created. (CRK000)
13.roots[1] = "C:\Users\Nonki\OneDrive\Documents\MySmallBasic\"
14.roots[2] = "C:\Users\Nonki\OneDrive\Documents\SmallBasic\"
15.roots[3] = "C:\Users\Nonki\OneDrive\Documents\SmallBasic\Shapes\Art\"

Following list shows the result of this program - the content of ProgramScanner.settings (array of folders).  105 folders were found.

Documents\\SmallBasic\\SmallQuest - Copy;91=C:\\Users\\Nonki\\OneDrive\\Docume
Press any key to continue...

Program Scanner

This program reads ProgramScanner.settings, gets folders from it, scans program source files, get information from them, and then writes them to ProgramDB.csv.  Program Scanner gathers following properties from each Small Basic source code.

  • Program ID
  • Source Filename
  • Screen Shot (Filename)
  • Description
  • Last Update
  • Version
  • Author
  • (Number of ) Lines
  • Subroutines
  • Challenge

This program has room for improvement.  For example, following list shows that a program ID written in a history can be gotten like HMX882 but failed with FGC959 written after "Program ID".

' 2012/09/08 20:42:17 Generated by Shapes Editor 0.3
' initialize shapes
Water melon,,,,120,Shapes_Init Shapes_Add,
' Windmill
' Copyright c 2015 Nonki Takahashi. The MIT License.
' 2015-02-05 2:13:11 Shapes generated by Shapes 2.1b.
' Program ID FGC959
ndmill,,,Nonki Takahashi,336,Shapes_Init Math_CartesianToPolar SB_RotateWorkarou
nd SB_Workaround Shapes_Add Shapes_CalcRotatePos Shapes_CalcWidthAndHeight Shape
s_Move Shapes_Remove Shapes_Rotate,
' Chirstmas Tree 0.1
' Copyright (c) 2012 Nonki Takahashi. All rights reserved.
' History:
' 0.1 2012/12/11 Created. (HMX882)
asic,,Chirstmas Tree,2012-12-11,0.1,Nonki Takahashi,368,AddFlashLights BlinkFlas
hLights Tree_Init Robot_Init Shapes_Add Shapes_CalcWidthAndHeight Shapes_CalcRot
atePos Shapes_Move Shapes_Remove Shapes_Rotate Math_CartesianToPolar,
Press any key to continue...

Program Database

This program has GUI (Graphical User Interface) and select programs with given properties.  Actually, I found a text compare subroutine like following parameters and modified it for this program.

Operators used in this program are from WHERE clause in SQL (Structured Query Language).

  • =
  • >
  • <
  • >=
  • <=
  • <>
  • AND
  • OR
  • LIKE

But in the current version, LIKE works just as partial match.

I will continue to develop for this project.  So please watch following discussion or repository.  Thanks.

See Also

Comments (1)

  1. I love the examples! Plus, even the See Also section at the end has some fantastic resources! Great job on this! Could also be a Wiki article?

Skip to main content