Page 1 of 1

Can Flowcode use external subroutines of Flowcode?

Posted: Wed Aug 20, 2008 11:23 pm
by jmccorison
For ease of development and testing, I would like to create my Flowcode project of multiple individual Flowcode programs. For example, I would like the user configuration (end user configuration of product settings) to be a Flowcode program unto itself which would be called from the main program. Basically what I'd like is external subroutines like you would create in a normal C development effort.

Thanks, Jim

Re: Can Flowcode use external subroutines of Flowcode?

Posted: Thu Aug 21, 2008 9:56 am
by Benj
Hello Jim

If you make macros in Flowcode then these can be exported like subroutine functions using the Macro -> Export menu. Then functions can be brought into programs using the import method.

Re: Can Flowcode use external subroutines of Flowcode?

Posted: Thu Aug 21, 2008 3:43 pm
by jmccorison
Ben,

Yes, but not really what I was thinking about. Without any kind of make facility, one would run the risk of updating a macro in a sub-program, then forgetting to export it and import it to the main program.

A possible future enhancement would be that an individual Flowcode program had an optional entry point name while a different Flowcode program would have an optional list of subroutines. At compile/link time the proper arguments would be passed to the linker to resolve the external references. I haven't search through SourceBoost's website to verify that their linker could handle this, but I would expect that it should. I can see that this, like imbedded C code, would not simulate properly.

Cheers,
Jim

Re: Can Flowcode use external subroutines of Flowcode?

Posted: Tue Feb 02, 2010 10:36 am
by jadiflow
Hello,

Has this situation changed since the quoted post?
I have several programs that use a common macro (hardware setup) and it gets hard to keep them all synchronized.
Would it be possible to import a macro when the program is loaded into Flowcode? That would fix it.

thanks,

jan didden
Linear Audio
jmccorison wrote:Ben,

Yes, but not really what I was thinking about. Without any kind of make facility, one would run the risk of updating a macro in a sub-program, then forgetting to export it and import it to the main program.

A possible future enhancement would be that an individual Flowcode program had an optional entry point name while a different Flowcode program would have an optional list of subroutines. At compile/link time the proper arguments would be passed to the linker to resolve the external references. I haven't search through SourceBoost's website to verify that their linker could handle this, but I would expect that it should. I can see that this, like imbedded C code, would not simulate properly.

Cheers,
Jim

Re: Can Flowcode use external subroutines of Flowcode?

Posted: Tue Feb 02, 2010 12:25 pm
by Steve
Nothing has changed, but it is a good suggestion for improving Flowcode and I will add it to a wishlist.

Re: Can Flowcode use external subroutines of Flowcode?

Posted: Tue Feb 02, 2010 3:37 pm
by jadiflow
Would a solution be to save a macro (in .c version) as a .h and add it as an include file in the compiler options?

jan didden
Linear Audio

Re: Can Flowcode use external subroutines of Flowcode?

Posted: Tue Feb 02, 2010 4:43 pm
by Steve
yes - that is a possibility.