Gem - a scripting system

For community projects only.
Post Reply
NTech
Posts: 33
Joined: Mon May 01, 2017 7:29 pm
Location: USA

Gem - a scripting system

Post by NTech »

Gem

What is Gem?

Gem is a scripting language, written in JustBasic.


What's its Syntax?
Gem's syntax is highly simple.

Code: Select all

  1 Write Hello
  2 Write World
  3 NewLine()
  4 Input() -> %1
  5 Cls()
  6 Exit()

Code: Select all

;Greeter

  1 Write Hello!
  2 Write What
  3 Write is
  4 Write your
  5 Write name?
  6 NewLine()
  7 Input() -> %1
  8 If %1 == NULL GOTO 20
  8 Write Ok,
  9 Write goodbye,
 10 Write %1
 11 NewLine()
 12 Input() -> %1
 13 Exit()

;Example of a 'if' block, called from line 8
 20 Write You
 21 Write did
 22 Write not
 23 Write give
 24 Write a
 25 Write valid
 26 Write name!
 27 NewLine()
 28 Input() -> %1
 29 GoTo 1
 
Yet it is powerful enough to help add dynamic content to JB apps, without editing the JustBasic itself.

What is Gem For?

I developed Gem in preparation for an experiment in artificial intelligence. The AI shall be able to dynamically alter its behavior via the execution of Gem scripts.

Yet Gem can be applied to far more scenarios than just AI. Gem could be used for app-extensibility (for example, scripts to apply effects to an image), and, perhaps, multi-threaded execution (a JB file executes a TKN which runs Gem scripts simultaneously).
8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8)
NTech
Posts: 33
Joined: Mon May 01, 2017 7:29 pm
Location: USA

Re: Gem - a scripting system

Post by NTech »

Gem V 0.2
Attachments
Gem.zip
Gem - V 0.2
(2.64 KiB) Downloaded 304 times
8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8)
Post Reply