Jabaco Notes For VB Developers

1/25/2011
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Visual BasicJabaco SupportSpecifics...
absExact  
addressof   
and  Refer to operators
appNone Version 1.5.2

App.Path causes Unhandled Null Exception
App.EXEName returns nothing
arrayNone Not supported. In VB, the Array function can be used to create arrays in variant variables. Example:

  Dim sInfo As Variant
  sInfo = Array("1", "2", "three")
  MsgBox sInfo(2)
The above code outputs "three" when Option Base 0 is in use.
asExact  
ascExact  
atomic_datatype  Atomic Datatypes:

Boolean
Byte
Char
Date  -- See date_object
Double
Integer
Long
String
binary  Refer to file_handling
boolean  Refer to atomic_datatype
byrefNone Jabaco ByVal and ByRef keywords have no effect.

Apparently Jabaco considers all parameters as ByVal--modifications of parameters within the subroutine will never affect the values of the variables in the calling subroutine.

Therefore, calling ByVal has no effect. Also, calling ByRef has no effect--it does not override the ByVal behavior. At this point, there is no way to have a ByRef parameter in a Jabaco subroutine call.

A deeper concern the arises from this is: By default, VB considers subroutine and function parameters as ByRef. Jabaco's current "default" behavior is to consider all parameters ByVal. This could obviously change the runtime behavior or VB code imported into Jabaco.
byte  Refer to atomic_datatype
byvalNone Refer to byref
case  Refer to select..case
cboolDifferences CBool when used in VB will raise a "Type Mismatch" error (Or a "Invalid Use Of Null") when the supplied value cannot be converted to boolean.

Jabaco appears to convert values successfully (i.e. string "True" to boolean True), but does not raise errors for invalid values.
cdateNone Conversions of strings to dates unreliable
char  Refer to atomic_datatype
chdirNone Not currently supported.

See chdrive, curdir
chdriveNone Not currently supported.

See chdir, curdir
chrExact  
clngDifferences CLng when used in VB will raise a "Type Mismatch" error (Or a "Invalid Use Of Null") when the supplied value cannot be converted to boolean.

Jabaco appears to convert values successfully (i.e. string "123" to long 123), but does not raise errors for invalid values.
close  Refer to file_handling
commandNone Not supported.

VB: Command (Command$) function will return command line parameters.
constExact  
constants  The following Visual Basic constants have been implemented in Jabaco. This is not a complete list, but includes the constants I have verified...

vbCr
vbCrLf
vbKeyAdd
vbKeyDelete
vbKeyDown
vbKeyEnd
vbKeyEscape
vbKeyF1..12
vbKeyHome
vbKeyLeft
vbKeyNumpad0..9
vbKeyPageDown
vbKeyPageUp
vbKeyRight
vbKeyUp
vbKeyInsert
vbNo
vbYes
vbYesNo

vbDirectory: See getattr
createobjectNone Does not apply.

CreateObject in VB performs a late binding object instantiation of an ActiveX object.
cstrDifferences CStr converts values to strings in most cases, with the following exceptions:

MsgBox CStr(False)
VB: This statement returns "False"
J: This statement returns "0"

MsgBox CStr(Null)
VB: This statement raises "Invalid Use Of Null" error
J: This statement returns an empty string "".
curdirNone CurDir function not implemented in Jabaco.

VB: CurDir returns the current working directory, which can be changed by ChDir, ChDrive
date  Refer to atomic_datatype
date_objectDifferences There are currently many differences between VB and Jabaco concerning date handling.

1) In VB, there is an atomic data type "Date" which can be dimensioned as you would ay other type such as Integer, etc. A VB Date type holds a date/time value. In Jabaco, a "Date" is currently a reference to the Java "date" object type, which has a different functionality.
VB: Dim MyDate as Date
J:  Dim MyDate as Date
    Set MyDate = New Date
Although the above code would compile, the behavior or MyDate in Jabaco will not match the expected VB behavior.
datediffNone DateDiff function is not implemented.
dayNone Date functions are not reliable.
dimExact  
dirDifferences Dir does not appear to support wild cards. If a file "C:\test.txt" exists, and the following statement is executed:

sFile = Dir$("c:\*.txt")
Jabaco returns an empty string. VB would have applied the wildcard and found "test.txt"
However, it does successfully test the existence of a file in the case of sFile = Dir$("c:\test.txt")
do  Refer to do..loop_until
do..loop_untilExact Compatible, Exit Loop supported.
doeventsExact  
double  Refer to atomic_datatype
elseExact Applies to: if..then select..case
endNone Standalone "End" statement to terminate program appears to be unsupported. Use the following work-around:

VB: End
J:  system.exit(0)
enumExact Enum appears to be supported. The IDE tips may not suggest the Enum members in all cases.
eof  Refer to file_handling
erase  Refer to redim
error  Refer to on..error
exitExact Applies to: do..loop_until for..next
file_handlingDifferences For basic file handling, the syntax and objects for opening, closing, reading, writing, and file modes is as follows:

VB: F=FreeFile
J:  Dim F as VBFileHandler

VB: Open "file.txt" For Output As #F
J:  F=Open("file.txt",Output,Write,Shared)

VB: Print #F,"hello"
J:  F.WriteString "hello"

VB: Input #F,sValue
J:  sValue=F.read

VB: Line Input #F,sLine
J:  sLine=F.readLine

VB: Close #F
J:  F.close

Jabaco also has additional file handling options, follow the tool tips of the VBFileHandler object.
filecopy  No documentation for this topic.
filedatetime  No documentation for this topic.
fileexists  No documentation for this topic.
filelen  No documentation for this topic.
for  Refer to for..next
for..nextExact  
formatDifferences Format in VB is a catch-all statement, researching Jabaco equivalents now:
freefile  Refer to file_handling
functionExact  
get  No documentation for this topic.
getattrDifferences Supported, but specifics unknown
goto  This entry refers to the Goto statement. For use with "error", see on..error.
hex  No documentation for this topic.
hour  No documentation for this topic.
if  Refer to if..then
if..thenExact  
input_#f  Refer to file_handling
inputbox  No documentation for this topic.
instr  No documentation for this topic.
instrrev  No documentation for this topic.
integer  Refer to atomic_datatype
is  No documentation for this topic.
isdate  No documentation for this topic.
isnull  No documentation for this topic.
isnumeric  No documentation for this topic.
join  No documentation for this topic.
kill  No documentation for this topic.
lcase  No documentation for this topic.
left  No documentation for this topic.
len  No documentation for this topic.
let  No documentation for this topic.
line  No documentation for this topic.
load  No documentation for this topic.
loadpicture  No documentation for this topic.
lof  No documentation for this topic.
long  Refer to atomic_datatype
loop  Refer to do..loop_until
me  No documentation for this topic.
mid  No documentation for this topic.
minute  No documentation for this topic.
mkdir  No documentation for this topic.
mod  No documentation for this topic.
month  No documentation for this topic.
msgbox  No documentation for this topic.
new  No documentation for this topic.
next  Refer to for..next
not  Refer to operators
nothing  No documentation for this topic.
now  No documentation for this topic.
on  Refer to on..error
on..error  No documentation for this topic.
open  Refer to file_handling
operators  No documentation for this topic.
optional  No documentation for this topic.
or  Refer to operators
paramarray  No documentation for this topic.
popupmenu  No documentation for this topic.
preserve  Refer to redim
print  No documentation for this topic.
print_#f  Refer to file_handling
private  No documentation for this topic.
public  No documentation for this topic.
put  No documentation for this topic.
raiseevent  No documentation for this topic.
redimExact Dim, Redim, and Erase (for dynamic arrays) are supported.
replace  No documentation for this topic.
resume  No documentation for this topic.
right  No documentation for this topic.
rmdir  No documentation for this topic.
second  No documentation for this topic.
select  Refer to select..case
select..caseDifferences Select, Case, and Case Else all work as expected. However, defining ranges using the "To" keyword is not supported:

Select Case sValue
  Case 1 'Supported
  Case 2,3,4 'Supported
  Case 5 to 10 'NOT SUPPORTED
  Case Else 'Supported
End Select
set  No documentation for this topic.
single  No documentation for this topic.
space  No documentation for this topic.
split  No documentation for this topic.
static  No documentation for this topic.
step  Refer to for..next
stop  No documentation for this topic.
string  Refer to atomic_datatype
string_function  No documentation for this topic.
sub  No documentation for this topic.
then  Refer to if..then
timer  No documentation for this topic.
to  Applies to: for..next select..case dim redim
trim  No documentation for this topic.
type  No documentation for this topic.
ubound  No documentation for this topic.
ucase  No documentation for this topic.
unload  No documentation for this topic.
until  Refer to do..loop_until
val  No documentation for this topic.
variant  No documentation for this topic.
vbkeypause  No documentation for this topic.
vbkeysubtract  No documentation for this topic.
vblf  No documentation for this topic.
vbminimized  No documentation for this topic.
vbokonly  No documentation for this topic.
vbstring  No documentation for this topic.
vbtab  No documentation for this topic.
vbtextcompare  No documentation for this topic.
vbunchecked  No documentation for this topic.
weekday  No documentation for this topic.
wend  Refer to while..wend
while  Refer to while..wend
while..wend  No documentation for this topic.
with  No documentation for this topic.
withevents  No documentation for this topic.

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z