A r t i c l e s

Note: This Wiki is
outdated, personal views
may have changed.
L505 A.I. bot is dead
long live THX 1138

M a i n P a g e

D i r e c t o r y

Ruby to Modern Pascal Cheatsheet

This will be updated with time, it is in no way complete nor will it ever be.

The languages contain some similarities with syntax but are extremely different in some respects.

comparing Ruby Modern Pascal
case bondage case sensitive case insensitive
type system dynamic typing, no strong declarations strong static typing with ways to escape
write line to std out puts() writeln()
write to stdout print() write()
incrementing i += 1
i = i + n
i:= i + n;
loop keyword yes no, use while or repeat
while loop while condition

while (conditions)

while condition do

while (conditions) do

by value parameters default default
by reference parameters not available available, prefix function parameters with VAR keyword
semicolon is terminator no, like Basic yes, terminates statement
single line comments # comment // comment
multi line comments =begin
(* these comments *)
{ or these }
object purism everything tries to be an object not everything tries to be an object
assignment operator = :=
equal comparison == =
less than < same
greater than > same
built in string type yes yes
string character access s[i].chr s[i]
string character ordinal value access s[i] ord(s[i])
pointers available huh? yes
pointers to chars huh? pchar type ( ^char)
procedures/function available outside classes can be faked using global DEF's yes
Class Garbage Collection yes no (but can use old objects or records on the stack without even a free or create call needed)
String Garbage Collection yes yes (reference counted)
String bigger than 255 chars yes yes

Note: This Wiki is outdated, personal views may have changed.

This wiki contains info on life, health, humans, nature, programming, database, fads, paradigms, poems, principles, theories.

Articles may contain statements which some may find helpful and encouraging, or even discouraging.

Beware, I believe in the Grand Justice system.
_ _ _