Geeks With Blogs


View Anthony Trudeau's profile on LinkedIn

Add to Technorati Favorites

Anthony Trudeau

You really start to appreciate the little things you have from modern languages and development environments.  I use Visual Studio 2008 now with all of the Intellisense goodness, tools, designers, et al.  But, like anything you start to take it for granted until in this case you're forced to work on a legacy, proprietary scripting language like the one in the data collection software that we use.

The program is called VisiBar and it's primarily used for barcoding.  This application uses it's own language so to speak which is made up of a series of constructs called verbs.  Verbs such as STORE, RSOPEN, IF, and GOTO (sorry in this language you have no choice) are tied together to create a distinct function.  Function is really a misnomer and it should be called a script.  This language, and I really use the term loosely, makes certain operations with data really easy; for example, by using RSPOPULATE you can in one step create an array for all of the fields in a record set.  Unfortunately, it also makes some things very difficult.  Case in point, the IF verb.  Every language I know (besides this one) uses IF to perform a block of code conditionally.  With VisiBar, IF is really a conditional GOTO.   So, if some statement is true then goto a specific label.  There's also no concept of boolean logic in your variables, so you're forced to assign "Y" and "N" values to variables and if you want to say something like if x > 0 and y > 0 you need to do something like this:

STORE   xGTZ     SWAP(LEFT(x, 1), "Y", 0, "N", "-", "N")
STORE   yGTZ     SWAP(LEFT(y, 1), "Y", 0, "N", "-", "N")
STORE   xyGTZ    xGTZ & yGTZ
IF             xyGTZ    IS EQUAL TO     "YY"      XYOKAY

In the above script I check for the negative sign and also compare to see if the value is "0".  I assign "Y" as the default if none of my other checks turn out (which is what I want).  The variables that store these initial "Y" or "N" values are xGTZ and yGTZ.  xyGTZ is then formed by concatenating the prior to variables.  I then use an IF verb to see if both values are true by looking for "YY", and if that is the case I can goto the label XYOKAY.

That's a lot of work for a simple comparison.  But, that's what I'm working on now.  It definitely makes me appreciate Visual Studio, C#, etc. and it also makes me want to push up the future project replace this old software.

Posted on Thursday, March 20, 2008 6:11 AM | Back to top

Comments on this post: Appreciating what you have

# re: Appreciating what you have
Requesting Gravatar...
Did you ever come up with a replacement for Visibar?
Left by Dan Mindlin on Feb 25, 2015 4:53 PM

Your comment:
 (will show your gravatar)

Copyright © Anthony Trudeau | Powered by: