PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
Answer not correct-VBForums
Results 1 to 7 of 7

Thread: Answer not correct

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    12

    Angry Answer not correct

    Hi everyone,

    I have the following code, can anyone tell me why it is returning zero, cos i cannot figure it out.
    VB Code:
    1. Public A As Integer, B As Integer
    2. Public Formula As String
    3.  
    4. Public Function FormulaBasher() As String
    5.    
    6.     Dim FormulaScript As New ScriptControl
    7.    
    8.     FormulaScript.Language = "VBScript"
    9.    
    10.     A = 10
    11.     B = 5
    12.     Formula = "A+B"
    13.  
    14.     FormulaBasher = CStr(FormulaScript.Eval(Formula))
    15. End Function

    Thanks in advance





    Edit: Added [vbcode][/vbcode] tags for clairty. - Hack
    Last edited by Hack; Aug 25th, 2005 at 10:58 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width