Syntax error on while/wend statement

[quote=492164:@Norman Palardy]Comments are great - right up until they arent maintained and are wrong or misleading
I try & write code that uses long variables names, long method names, and is as close to “self documenting and self describing” as I can make it without writing Cobol :slight_smile: (or applescript)[/quote]

I like your approach, elegance can be confusing. KISS, read it like a book. I take it you have been doing this for a while.

Sold my first piece of software work in 1983
THEN went to college and eventually University to figure out out how to do this :stuck_out_tongue:
Worked paid jobs all the way through University
And done it ever since

Lucked out and had a hobby way back then that I liked, still like, and that pays me well enough :slight_smile:

[quote=492168:@Norman Palardy]Sold my first piece of software work in 1983
THEN went to college and eventually University to figure out out how to do this :stuck_out_tongue:
Worked paid jobs all the way through University
And done it ever since

Lucked out and had a hobby way back then that I liked, still like, and that pays me well enough :)[/quote]

Great way to get there Norman. A good hobby you love will inspire.

Would you go to this extreme to make make your code readable?

Load_Save_Class_Instance = new LoadSaveClass

Or do you have another approach?

Probably since I dont know if I’m going to return to this code in a day, a week, a month or a year
Or ever

Dim inputStream As TextInputStream = TextInputStream.Open( themeFile )
Dim themeData As String = inputStream.ReadAll 
inputStream = nil
Dim newtheme As FontAndColorTheme = FontAndColorTheme.FromXML( themeData )

I’d hazard a guess you could tell me roughly what that code does without ever having seen it before ?
and if not then I need to revise some of it to be more clear :slight_smile:

[quote=492174:@Norman Palardy]Probably since I dont know if I’m going to return to this code in a day, a week, a month or a year
Or ever

Dim inputStream As TextInputStream = TextInputStream.Open( themeFile )
Dim themeData As String = inputStream.ReadAll 
inputStream = nil
Dim newtheme As FontAndColorTheme = FontAndColorTheme.FromXML( themeData )

I’d hazard a guess you could tell me roughly what that code does without ever having seen it before ?
and if not then I need to revise some of it to be more clear :)[/quote]

No, very clear and It takes less time to understand. I like it. Time is $ in your line of work so I will use your advice. Nice to have the easy search and replace to help me go back and make some of these changes to my code. Going back 18 years to rebuild my code for RealBasic 4.5 running on OS-9 can be a little daunting.

The rewrite ahead of me is extremely complex and its job is to continue controlling my home automation hydroponic floor heated passive 2700 sq ft home. It is beyond belief for most that have seen it in operation besides all the hand-engineered and designed interface electronics. To bad Arduino wasn’t around in the days. The thrust of the idea was mainly energy conservation and it paid off. For the first 15 years, my energy bill ran less than $39 per month. That was a nice feel good for the amount of work it took. Good to have a hobby you love.

I’m attempting to better understand how to take advantage of Opps but have concerns I’m still thinking too linear. For example, if I checking 25 sensors should each sensor have its own instance and properties to hold it’s data? I have often believed since instances can dissolve I would just store the data in array modules etc with permanency and do the work from one sensor subclass of like the serial class. Hope that makes sense.

Thanks for your great sound advice Norman. I look forward to hearing more from you forward.

I would need more context in order to answer the question, but I just wanted to point out that instances are no more or less permanent than arrays. Again, I would need more context, but I might approach this as an array of sensor instances in a module somewhere.