Connect with us

create a function in basic language

Discussion in 'Microcontrollers, Programming and IoT' started by ashkan4818, Jan 18, 2016.

Scroll to continue with content
  1. ashkan4818


    Jan 18, 2016
    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???
  2. ashkan4818


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

    Attached Files:

  3. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    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
    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.
    ashkan4818 and hevans1944 like this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day