| Visual Basic | Jabaco Support | Specifics... |
| (declare)getprivateprofilestring | Differences | Windows API call for reading values from INI files. |
| (declare)writeprivateprofilestring | Differences | Windows API call for writing values to INI files. |
| abs | Exact | |
| addressof | ||
| and | Refer to operators | |
| any | None | |
| app | None | Version 1.5.2 App.Path causes Unhandled Null Exception App.EXEName returns nothing |
| array | None | 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. |
| as | Exact | |
| asc | Exact | |
| 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 | |
| byref | None | 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 | |
| byval | None | Refer to byref |
| case | Refer to select..case | |
| cbool | Differences | 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. |
| cdate | None | Conversions of strings to dates unreliable |
| char | Refer to atomic_datatype | |
| chdir | None | Not currently supported. See chdrive, curdir |
| chdrive | None | Not currently supported. See chdir, curdir |
| chr | Exact | |
| clng | Differences | 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 | |
| command | None | Not supported. VB: Command (Command$) function will return command line parameters. |
| const | Exact | |
| 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 | |
| createobject | None | Does not apply. CreateObject in VB performs a late binding object instantiation of an ActiveX object. |
| cstr | Differences | 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 "". |
| curdir | None | 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_object | Differences | 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. |
| datediff | None | DateDiff function is not implemented. |
| day | None | Date functions are not reliable. |
| dim | Exact | |
| dir | Differences | 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_until | Exact | Compatible, Exit Loop supported. |
| doevents | Exact | |
| double | Refer to atomic_datatype | |
| else | Exact | Applies to: if..then select..case |
| end | None | Standalone "End" statement to terminate program appears to be unsupported. Use the following work-around:VB: End J: system.exit(0) |
| enum | Exact | 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 | |
| err | Differences | The Err object appears to be a java object, not a replication of the VB object. Code workarounds will be required. |
| error | Refer to on..error | |
| event | Exact | Event appears to function well. I have not tested Dim Withevents yet... |
| exit | Exact | Applies to: do..loop_until for..next |
| file_handling | Differences | 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 | Exact | |
| filedatetime | None | Appears not to have been implemented in Jabaco. |
| filelen | Exact | |
| fix | Exact | |
| for | Refer to for..next | |
| for..next | Exact | |
| format | Differences | Format in VB is a catch-all statement, researching Jabaco equivalents now: |
| freefile | Refer to file_handling | |
| function | Exact | |
| get | Refer to file_handling | |
| getattr | Differences | Supported, but specifics unknown |
| goto | This entry refers to the Goto statement. For use with "error", see on..error. | |
| hex | Exact | |
| hour | None | Date functions are not reliable. |
| if | Refer to if..then | |
| if..then | Exact | |
| input_#f | Refer to file_handling | |
| inputbox | Exact | |
| instr | Exact | |
| instrrev | Differences | Functionality is the same. May require code changes if importing a VB project, as the start parameter is not optional if you are trying to specify the comparison type. |
| int | Differences | Int appears to return an Integer value. This makes the "Int" function the same as the "CInt" function. In VB, the "Int" function is the same as the "Fix" function. |
| integer | Refer to atomic_datatype | |
| is | Refer to nothing | |
| isdate | None | Date functions are not currently reliable. |
| isnull | Differences | Appears to detect nulls. Incorrectly returns true for a variant type that has not been defined.Dim x MsgBox IsNull(x) 'VB returns False, Jabaco returns True <----- x=Null MsgBox IsNull(x) 'VB returns True, Jabaco returns True x=123 MsgBox IsNull(x) 'VB returns False, Jabaco returns False |
| isnumeric | Exact | |
| join | Exact | |
| kill | None | Appears to not work. If you create a text file "C:\test.txt", then attempt the statement Kill "C:\test.txt"The file does not get deleted. |
| lcase | Exact | |
| left | Exact | |
| len | Differences | The Jabaco Len function expects a string, and returns length of strings properly. The VB Len function also returns the byte length of any variable type, meaning the following are valid examples that do not work in Jabaco: Dim x as Integer Dim y as Long MsgBox Len(x) 'should return 2 MsgBox Len(y) 'should return 4 Although there is little reason to support this for atomic data types, it is handy when trying to determine the length in bytes of a user defined Type. |
| let | None | Let works properly when it is part of a Property declaration. However, the standalone "Let" statment is not supported.Dim x as Integer Let x=3 Obviously, most of us stopped using Let in this fashion about 40 years ago. |
| line | Differences | The line method works well, but the syntax is different than VB. Imported projects will need to be converted. |
| load | Differences | Someone research dynamic loading of controls at runtime for me? |
| loadpicture | Differences | Loadpicture is supported by not exactly identical, returns a "resource" instead of a picture type. Will search the forums... |
| lof | Refer to file_handling | |
| long | Refer to atomic_datatype | |
| loop | Refer to do..loop_until | |
| me | Exact | |
| mid | Exact | |
| minute | Differences | Date functions are not currently reliable. |
| mkdir | Differences | MkDir appears to make directories successfully. However, it does not raise a runtime error when the target directory already exists. |
| mod | Refer to operators | |
| month | Differences | Date functions are not currently reliable. |
| msgbox | Exact | |
| new | Differences | New appears to be optional in Jabaco, meaning objects are automatically instantiated when used. Possible the new keyword is simply ignored. In VB, the following would fail:Dim x as SomeClass x.SomeMethod="hello"In Jabaco, it appears that the first reference to x will instantiate the class, whereas in VB the following would have been required: Dim x as New SomeClass |
| next | Refer to for..next | |
| not | Refer to operators | |
| nothing | None | "is nothing" when referencing an object variable appears to always return True. |
| now | Differences | Date functions are not currently reliable. |
| on | Refer to on..error | |
| on..error | Differences | Appears supported, but in general it is very hard to get Jabaco to throw an error. Example:On Error goto MathError x = 1/0 MsgBox "should not see this." exit sub MathError: MsgBox "error handled." The above example does not display "error handled" as expected. Nor does it raise a division by zero error. |
| open | Refer to file_handling | |
| operators | Exact | Arithmetic as well as bitwise operators appear valid, including Mod, Not. |
| optional | Differences | Optional parameter works. However, in function calls the "middle" parameters cannot be left out as expected. With a function declared as:Private Function AddNumbers(a As Integer, b As Integer, Optional c As Integer=0, Optional d As Integer=0, Optional e As Integer=0) As Integer ...the last statement below will not compile: MsgBox AddNumbers(1,2) MsgBox AddNumbers(1,2,3) MsgBox AddNumbers(1,2,,5) '<--will not compile |
| or | Refer to operators | |
| paramarray | None | ParamArray keyword is recognized by the IDE, but does not appear to correspond to the VB statement. The function declaration below will not compile:Private Function AddNumbers(ParamArray A()) as Integer In VB, a ParamArray is an array, denoted by the () after the variable name. VB does not allow a datatype to be specified, ParamArrays are always of type variant. |
| popupmenu | No documentation for this topic. | |
| preserve | Refer to redim | |
| No documentation for this topic. | ||
| print_#f | Refer to file_handling | |
| private | No documentation for this topic. | |
| public | No documentation for this topic. | |
| put | Refer to file_handling | |
| raiseevent | No documentation for this topic. | |
| redim | Exact | 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. | |
| rnd | No documentation for this topic. | |
| second | No documentation for this topic. | |
| select | Refer to select..case | |
| select..case | Differences | 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. | |
| shell | No documentation for this topic. | |
| single | No documentation for this topic. | |
| space | No documentation for this topic. | |
| split | Exact | |
| static | No documentation for this topic. | |
| step | Refer to for..next | |
| stop | No documentation for this topic. | |
| strconv | 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 | Refer to event |