Create Multi Function ?

BlitzMax Forums/BlitzMax Programming/Create Multi Function ?

Sarge(Posted 2005) [#1]
Hi i was just wondering if it is possible to create something like ex.

test ' start the function

'put code here

endtest ' end the function

both functions work together.


ImaginaryHuman(Posted 2005) [#2]
Hmm, sorry but I can't tell what you're trying to do. Are you trying to call a function which runs alongside some other code, so that both are going at once until you tell it to end?


Sarge(Posted 2005) [#3]
no i want 2 function to work with eachother

1 of the functions is the start and the second function ends the first function so they work to gethter but in the middle of the functions you type your code like ex.

repeat
'put code here
forever

thanx


Bot Builder(Posted 2005) [#4]
o.0

erm

why not call one function, put code after that, call the second?


Shagwana(Posted 2005) [#5]
Sarge, what you ask for makes little sense.

Theres a Fuction code lump that you could be after. For example;

...
repeat
  test()
  forever
...
function test()
  'Do what ever in here
  end function 


But if what i suspect your after, is some way for making your own special statement code, like <if,else,endif>, <select,case,default,end select> and <repeat,until>. If thats the case, then theres no way to do it and there is no need to either. The current statement blocks are designed so you can expand them how you desire, and they can be made to cover everything a programmer would want to do.


Sarge(Posted 2005) [#6]
yea i thought the was no way to do it thanx anyways