Structured programming - suggestions?

nnCron and nnCron LITE discussion

Structured programming - suggestions?

Postby Hobbyist » Wed, 27 Jul 2005, 09:56

I'm writing a series of about 10 seperate tasks that all access a common set of global variables. At the moment I have a "Dummy" NoActive task at the top of my .tab file with all the VARIABLE, CREATE/ALLOT, PLACE, and assign lines. I'd like to be able to seperate out each of the task definitions that follow into seperate text files because it's getting very confusing paging up and down through many screens to get from top to bottom.

I've been going throught the tutorial mentioned in the help file (ie. ... om%20Files ) but all I can find is the word INCLUDE and that doesn't seem to work. It doesn't work outside of any task definitions (classic mode error), and it doesn't even seem to work when I try #( INCLUDE ... )#.

How do I seperate several tasks that need to access common variables into managable size text files?

Posts: 3
Joined: Tue, 19 Jul 2005, 08:11

Postby VK » Wed, 27 Jul 2005, 10:35

IMHO, the easyest way to separate the tasks to text files is to place each task in separate crontab with unique name. All the crontabs should be 'plugged in' in nncron.ini using the word Crontab:.

The standalone text file with global variables can be 'included' in nncron.ini as well using the word INCLUDE.
User avatar
Posts: 680
Joined: Wed, 14 Jul 2004, 19:17

Postby Hobbyist » Fri, 29 Jul 2005, 20:27

That works....Thanks VK.

I've got 2 more quick questions if you don't mind. (TIA)

I'm trying to put together a set of top level tasks (Frame1, Frame2, AsmGif, etc) that put Deep Space Explorer, Photoshop, ULead Gif Animator, and Xara 3D (for lettering) through thier paces to produce a "fine tuned" animated gif of a ship making a pass by a revolving planet while emiting lightning down to the surface to spell out a couple of words in crater impresions. The actions needed to produce each frame are not the same throughout the animation but there's a ton of overlap when I break things down into blocks of 5 or 10 seconds of mouse and keyboard activity with a specific program. I'm trying to set up the top level tasks to simply call sequences of shared "utility level" tasks to take advantage of this overlap.

1. Is simply using a sequence of RUN lines in the top level tasks going to be my best approach. No need for semephores if the utility tasks are to be executed one after the other, right?

2. I'd like to be able to RUN a task at the begining of each top level task that would present me a "form" where I can review and edit the values assigned to my tweakable global variables. Whats the easiest want to do run-time user I/O to get a value into a VARIABLE? How about a CREATE/ALLOT string array?

Posts: 3
Joined: Tue, 19 Jul 2005, 08:11

Return to nnCron forum (English)

Who is online

Users browsing this forum: No registered users and 1 guest