You can find some features by watching directly the BNF definition file.
- only simple VB types like string, integer (hexadecimal, octal), float, boolean
- global and local variables
- functions and subs
- operators like +,-,*,/,\,imp,eqv,xor,or,and,not,>=,<=,>,<,<>,=,&,mod,^ with the VB6 precedence order.
- the 'if' and 'while' statements
- VB functions like 'print', 'msgbox', 'clng', 'cstr', 'inputbox', 'rnd', 'exit'
Differences from VB6
- operators like +=,-=,*=,/=,++,--
- variable declaration with direct assignment
- operators only work with the same types (use conversions functions like clng, cstr to switch types)
- parenthesis is always required when calling functions or subs
DC3 language is very similar to VB script; variables have no type and the type is implicit. It recognizes some internal functions: print, msgbox, inputbox, clng, cstr, exit, rnd
You can define variables, functions, variables in the order you want and the compiler is not case sensitive.
You have declared a string variable 'a', a generic variable 'b' and a numeric variable 'c'.
message ("bye bye!")
this small program shows a message box with the "bye bye!" string.
this program returns 60 -> 10+10+20+20 and "ab" --> "a" + "b"
dim a="hello "
this sample shows "hello world" on the screen
this sample returns 11
if n>0 then
this program writes 0,1,2,3,4,5,6,7,8,9,10 to the console using recursion.
s=inputbox ("Write your name")
msgbox ("Your name is " + s)
this program writes your name
this program repeats a sum for 10 times returning 45 as result