Maker Pro
Maker Pro

create a function in basic language

ashkan4818

Jan 18, 2016
2
Joined
Jan 18, 2016
Messages
2
hi my friends:):) i need create a function in mikroBasic PRO for PIC compiler ,

I need your help:rolleyes::rolleyes:


My question is how do I create a function in mikroBasic???
 

ashkan4818

Jan 18, 2016
2
Joined
Jan 18, 2016
Messages
2
What is the meaning of this error????
 

Attachments

  • ssssss.jpg
    ssssss.jpg
    12.5 KB · Views: 77
  • vvvvvvvvvvvvvvvv.jpg
    vvvvvvvvvvvvvvvv.jpg
    28.6 KB · Views: 77

Harald Kapp

Moderator
Moderator
Nov 17, 2011
12,512
Joined
Nov 17, 2011
Messages
12,512
sub function shift (dim i as integer) as word
defines a sub function named shift with an input parameter named i as a byte and a return value as word.

"Return value of the function shift is not defined" tells you that per definition shift() sholuld return a word value, but there is no such statement in the code.
Depending on the basic dialect (and sorrry, I'm not familiar with mikroBasic) this is typically done bei either
shift = return_value where return_value is a word that is returned to the calling routine or by
return(return_value)
You'll have to look up the precise statement in the mikrbasic language reference manual.

The other errors are probably somewhere else in the code. lacking the complete code and matching line numbers it is hard to tell.
 
Top