- Excelbooster support file input, output functions with binary format only and support limited character functions

Excelbooster VBA 1. Supporting VBA Grammar Excelbooster will convert VBA codes to C++ codes and AMP C++ codes which enable parallel computing with any...
26 downloads 0 Views 188KB Size
Excelbooster VBA 1. Supporting VBA Grammar Excelbooster will convert VBA codes to C++ codes and AMP C++ codes which enable parallel computing with any GPU card. However, Excelbooster can’t convert all VBA grammar or functions. Also, there will be rounding error due to the difference in computing method. - Excelbooster support file input, output functions with binary format only and support limited character functions. - All key words should be started with an uppercase letter followed by lowercase letters. For example, If is allowed while IF, iF, if are not allowed. - Only English alphabets and “_” can be used for variables, functions, worksheets, ranges name. Also, name can’t be started with numeric number. - Excelbooster converts name as it is without any modification; therefore, all names should follow C++ instruction. 1.1 Declare - All VBA codes start with “Option Explicit”; otherwise, Excelbooster stops converting. - Variant, Object type can’t be used. Excelbooster supports only following types: Integer, Double, Single, Long, Short, fixed number String - Reserve words for Parsing: "Attribute", "Access", "And", "As", "Boolean", "Call", "Case", "Cells", "ClearContents", "Close", "Const", "Dim", "Double", "Else", "ElseIf", "End", "Erase", "Exit", "Explicit", "False", "For", "Function", "Get", "If", "Integer", "Long", "Mod", "Next", "Not", "Option", "Or", "Private", "Public", "Range", "ReDim", "Select", "Sheets", "Short", "Single", "Step", "Sub", "Then", "True", "Type", "To", "Value", "With", "Worksheets" - Wrong Declaration: Dim A, B, C As Double Excelbooster Functions

Page 1 of 5

- Correct Declaration: Dim A As Double, B As Double, C As Double - Correct Type Declaration: Type variable can’t be used inside Type declaration and should be declared one variable at each line. Public Type Vtb_Table_D Vtb_Code1 As Double Vtb_Code2 As Double Ystr_Rsfn(0 To 99) As Double Yend_Rsfn(0 To 99) As Double End Type - Private, Public, Constant, Array Declaration Private Product_Fund_Cnt As Integer Public Const Market_Return_Cnt As Integer = 6, Scn_Rec As Integer = 1000 Private GPrem(0 To Max_End_Age) As Single Public Lapse_Rate(1 To 12) As Double - Wrong Declaration: Variable or numerical formula can’t be used to declare Array size. Private GPrem(Max_End_Age-1) As Single - Starting number for Array is 0 or 1. 1 is default number. 1.2 Sub and Function - Declare Sub Public Sub Get_Scenarios() ... End Sub - Inside Sub Exit Sub: To end Sub routine Dim TotRec As Single Redim can’t be used - Use Call to call Sub routine to avoid conflicts with Array name Call Get_Scenarios 1.3 Assignment Operator - Vtb2_Ystr_Rsfn(j) = Vtb_Table_Data(i).Ystr_Rsfn(j) - a=3:b=4:c=5 Excelbooster Functions

Page 2 of 5

1.4 With - Excelbooster does not support Object; therefore “With” can be used with “Type” structure variables With AAA .BB = 3 ' same as AAA.BB = 3 With BBB .CC = 5 ' same as BBB.CC = 5 .BB = 6 ' same as BBB.BB = 6 End With .DD = 7 ' same as AAA.DD = 7 End With 1.5 If, Then, Else and Arithmetic Operator - If … Then Else End If - If … Then … Else - Select Case Product_Code Case 1 To 3 Case 4 To 7 Case Else End Select - Excelbooster does not support For Next Step Exit For (For Each ) - Arithmetic Operator +, -, *, /, \, ^, Mod, (, ) , >=,

Suggest Documents