Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing by value to SUB problem. Please help.
#1
Trying to pass by value of variables "K" and "HistoryDays", but an error message
" Expected: variable or BYVAL or SEG or )"
and the highlighted cursor is on "(K), (Hist" of the SUB.

The following is part of the code.

K=2520
HistoryDays = 2

CALL getHISTORY ((K), (HistoryDays))


SUB getHISTORY ((K), (HistoryDays))
.....
.....
END SUB

Can you please help?

Thanks
kc
Reply
#2
You have too many parentheses. Try
Code:
CALL getHISTORY (K, HistoryDays)


SUB getHISTORY (K, HistoryDays)
.....
.....
END SUB
Also, using CALL for a SUB is no longer necessary. You can just use
Code:
getHISTORY K, HistoryDays
Notice that when I omitted CALL, I also dropped the parentheses.
hrist Jesus came into the world to save sinners, of whom I am first.(I Timothy 1:15)

For God so loved the world, that He gave His only begotten Son,
that whoever believes in Him should not perish, but have eternal life.(John 3:16)
Reply
#3
kc
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)