Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A VBScript implementation. Just because.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 lib
Octocat-spinner-32 old
Octocat-spinner-32 spec
Octocat-spinner-32 t
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 rasp.gemspec
Octocat-spinner-32 scratch.rb
README.markdown

rasp

A VBScript runtime, running on the Rubinius VM.

Untested, undocumented, and ill-advised.

Usage

Given t/easy.vbs:

Option Explicit

Const MIN = 1
Const MAX = 10

Function fib(n)
   If n < 3 Then
      fib = 1
   Else
      fib = fib(n - 2) + fib(n - 1)
   End If
End Function

Dim i
For i = MIN To MAX
   WScript.Echo "fib(" & i & ") = " & fib(i)
Next

Run:

bin/rasp t/easy.vbs --run

And you'll see:

fib(1) = 1
fib(2) = 1
fib(3) = 2
fib(4) = 3
fib(5) = 5
fib(6) = 8
fib(7) = 13
fib(8) = 21
fib(9) = 34
fib(10) = 55
Something went wrong with that request. Please try again.