PPRuNe Forums - View Single Post - Programming - Where to start?
View Single Post
Old 18th December 2011 | 17:52
  #27 (permalink)  
Mac the Knife

Plastic PPRuNer
25 Anniversary
 
Joined: Sep 2000
Posts: 1,902
Likes: 0
From: Rochechouart, France
"A few years ago I asked someone on here (can't remember who) how to create 1000 files numbered sequentially. They posted a script they had made specifically for my requirements. That is my goal, I think- to be able to do something like that"

I wrote your script. I could do it because I learned how to program (painfully) by writing a fairly complicated Sinclair BASIC application (complete with assembler for horizontal scrolling of a section of the screen) to interface in quasi real-time with a laser-doppler flowmeter using a DA/AD converter.

This was a highly modular program (I will confess to a single GOTO) in which the main loop really did nothing but call modules (as it should) with a lot of module reuse.

OO hadn't been invented yet and when I started I knew very little, but writing an OO type program just seemed "right" and elegant.

I could write your script (though I was rusty!) in DOS batch language (which is a very simple programming language) because I'd learned the basic principles of program flow and control (and validation!) years ago (and also had learned some of the tricks/peculiarities that every programming language has).

You learn to program by programming, just as you learn to fly by flying....

Here's the script.....

http://www.pprune.org/computer-inter...le-system.html
right at the end for the final version

Mac

PS: Looking at this now is horrible as I can see several ways of making it neater and cleaner but it was a quick and dirty solution to the problem...

Last edited by Mac the Knife; 18th December 2011 at 18:52.
Mac the Knife is offline  
Reply