Can Flowcode use external subroutines of Flowcode?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
jmccorison
Posts: 26
Joined: Mon Aug 18, 2008 11:47 pm
Location: Orcas Island, WA
Contact:

Can Flowcode use external subroutines of Flowcode?

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Can Flowcode use external subroutines of Flowcode?

Post 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.

jmccorison
Posts: 26
Joined: Mon Aug 18, 2008 11:47 pm
Location: Orcas Island, WA
Contact:

Re: Can Flowcode use external subroutines of Flowcode?

Post 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

jadiflow
Flowcode v5 User
Posts: 273
Joined: Thu Apr 17, 2008 9:59 am
Has thanked: 19 times
Been thanked: 16 times
Contact:

Re: Can Flowcode use external subroutines of Flowcode?

Post 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

User avatar
Steve
Matrix Staff
Posts: 3426
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Can Flowcode use external subroutines of Flowcode?

Post by Steve »

Nothing has changed, but it is a good suggestion for improving Flowcode and I will add it to a wishlist.

jadiflow
Flowcode v5 User
Posts: 273
Joined: Thu Apr 17, 2008 9:59 am
Has thanked: 19 times
Been thanked: 16 times
Contact:

Re: Can Flowcode use external subroutines of Flowcode?

Post 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

User avatar
Steve
Matrix Staff
Posts: 3426
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Can Flowcode use external subroutines of Flowcode?

Post by Steve »

yes - that is a possibility.

Post Reply