PDA

View Full Version : Functions



AndyP
- 15th August 2004, 09:00
The ability to write functions that take variables as parameters and return variables back to the calling statement, similar to functions in VB and C.

scorpion
- 5th May 2005, 18:58
that sounds like a common theme and i would have to agree with you.

OXIMBIT
- 5th May 2005, 21:16
In reality to write a compiler with Functions and Procedures makes it a different product. You lose all the flexibility you currently have. After a lot of thought on this subject I can only see the vars saved buy using a Local is worth all the effort converting your code. Even then it's not that often you run out of Ram. Code usage goes up a load when you start to shift data around just to use a Procedure, when a global is easier & quicker.

C is a procedural language but you have to write a lot more code to do the simple stuff like LCDOUT Bin vara. I will admit the ease that you can write new reusable routines is nice though.

Acetronics2
- 6th May 2005, 09:06
Hi,

As PBP has open libraries, you can write and add quite all functions you want ... just have a look to see how Pbpicxx.lib is written.

Need a little brainache from you, may be ...

Alain

Don Mario
- 6th May 2005, 12:00
I2C Slave function ! Very usefull !

Don Mario