Re: [mvdbms] Digest for mvdbms@googlegroups.com - 1 update in 1 topic

62 views
Skip to first unread message

altsys1 .

unread,
Sep 21, 2015, 3:11:52 PM9/21/15
to mvd...@googlegroups.com
Great stuff Randy!

Bruce Cameron
---------------------------------------------------------------------------------------------------------------------------------------
The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed.   It may contain confidential or legally privileged information.  If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action on the contents of this information is strictly prohibited and may be unlawful.  If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. The sender is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt.


On Mon, Sep 21, 2015 at 2:40 PM, <mvd...@googlegroups.com> wrote:
Randy Walsh <randy...@gmail.com>: Sep 19 02:52PM -0700

I thought I'd share a project I started, it's called JSB (short for JSON
enabled Basic). Url address is: TCL
<http://jsonbasic.azurewebsites.net/___jsbhtml5/tcl.html> (See some docs
here: OnLine Help <http://jsonbasic.azurewebsites.net/sysprog/help> - or
type "help subject" from TCL
<http://jsonbasic.azurewebsites.net/___jsbhtml5/tcl.html>)
 
It converts MV Basic (mostly) to JavaScript. I still have a lot of
improvements that I'm working on, but I've noticed over the past in this
group that people have talked about such an idea. I'm doing this for fun.
Although I don't work in an MV Enviroment, I once did about 35 years ago,
and I have always enjoyed what the MV world have to offer. And, yes, to
those that already know it, JavaScript has brought back much of what MV
was, at least to me.
 
To see some translated code, try this:
 
From TCL <http://jsonbasic.azurewebsites.net/___jsbhtml5/tcl.html>,
type: > CREATE-FILE BP
 
> ED BP TEST
 

 
(In the editor type a program and then click save!)
 
PRINT @(-1):"HELLO"
 
DEBUG
 
STOP "DONE"
 

 
> BASIC BP TEST (L
 
(using the L option will show a listing in javascript)
 

Because this is a JavaScript implementation, you can see all the sources
(use your browser to inspect).
 
I work a lot in JavaScript and Visual Basic (.Net), so I've extended the
language with some additional syntax, and I've taken the liberty of using
what I liked best about MV Basic. There are Q-PTRS to my server for the
FILES (tables) JSB_TCL
<https://jsonbasic.azurewebsites.net/sysprog/?l%20jsb_tcl> functions, the
JSB_HTML <https://jsonbasic.azurewebsites.net/sysprog/?l%20jsb_html>
functions, and other general functions (JSB_BF
<https://jsonbasic.azurewebsites.net/sysprog/?l%20jsb_bf>). You can LIST
and VIEW these items at the TCL command prompt.
<http://jsonbasic.azurewebsites.net/___jsbhtml5/tcl.html> You will get a
lot of ideas about how I have extended the language by looking at the code
in those tables.
 
If your an MV Basic programmer, you will find most R83 MV Basic commands
will work, but I've dropped the "." syntax in variable names (use "_"
instead), and I've gotten rid of the "expr expr" syntax of formatting, and
changed it it a function Fmt(expr, expr). I currently don't have code for
Locks (READU, LOCK, etc.) This may come later. I've added function
support, and I'm currently working on Class (object) support. And, also
I've added string escapes for strings with single or double quotes ie, PRIT
'ain\'t that nice"; If you don't want string escapes, use the back quote
` character, as in PRINT `ain't this nice too`
 
Currently the database is using the Local Storage
<http://www.w3schools.com/html/html5_webstorage.asp>, which means all your
programs and data are being stored by the Browser and local only to you. I
have code in there for indexed DB (slow), and direct filesystem access for
browsers that support this (HTA - windows) and Andriod-PhoneGap). Yes, this
project will compile under PhoneGap and can be run stand-alone on an
Android Phone or Tablet.
 
I am working on an "ENGLISH" front end for the database. You can do
simple "LIST" and "SORT" commands at this point. I don't have the META Data
defintions done yet (so no ICONV's or OCONV's yet). The low level
libraries for all the database I/O are here
<http://jsonbasic.azurewebsites.net/___jsbhtml5/js/jsbLibDB.js>. I also
have a higher level Database I/O, which is written in the language it self. see
this code
<https://jsonbasic.azurewebsites.net/sysprog/?view%20jsb_odb%20%27i_db%27>
 
Anyway, I hope you enjoy. Pretty much all the source is there so if
something isn't working, have a look at it. I'll try to fix bugs as I have
the time. (Got to work a day job and take care of a family too).
 
Enjoy! and may God bless you richly. Randy
 
 
p.s. If your program crashes or something doesn' work right, just refresh
your browser. Remember, anything you write is local to your browser, so if
you delete your browsing history, you'll lose your stuff.
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to mvdbms+un...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages