tags:

views:

54

answers:

1

Hello,
I'm developing memory management program, that the Form1_Load Sub is like this:

Private Sub Form_Load()
    HeapSize()
    HeapFree()
    HeapMax()
    StorageSize()
    StorageFree()
End Sub

But when I try to compile it, I'm getting this:

Compiling...
frmMain.hbf (1) : error #2000 : parse error before 'end-of-line'
frmMain.hbf (2) : error #2000 : parse error before 'end-of-line'
frmMain.hbf (3) : error #2000 : parse error before 'end-of-line'
frmMain.hbf (4) : error #2000 : parse error before 'end-of-line'
frmMain.hbf (5) : error #2000 : parse error before 'end-of-line'

MemManager - 5 error(s), 0 warning(s).

How can I solve this?

+1  A: 

I'm assuming the five method calls inside Form_Load are all Subs (as opposed to Functions), in which case you need to remove the parenthesis from after the method name:

Private Sub Form_Load()
    HeapSize
    HeapFree
    HeapMax
    StorageSize
    StorageFree
End Sub
Adam Maras