Configuration of Variables (only seen and set once)
Main loop()
Choose/Set the current Library# to use.
Use Library# to assign correct path for library#.txt in root folder.
Begin embedded loop / interior loop nextWord();
Embedded loop()
Choose/Set the current word to be looked at
Load the library *NOTE* rather than redundantly loading this, I should place it outside the embedded loop somewhere. ignore please.
Load the word we chose to look at.
If we are attempting to look at a word that isn't present, we must jump to the bottom and finish printing results.
If a word is found, let us proceed.
Looks at the first letter, or next letter, depending on which value is assigned. We will remember this letters numerology value!
Shift to the next letter in question.
Numerology value of the latest letter, plus that of the previous gives us a new Sum we will use later.
If the new Sum hasn't changed upon adding the two number values together, we must not have added a letter to it and the word is completely analyzed.
Lets say the word is now complete at this point.
Store word1 or whichever word it is (counting upward as we progress) as the value of all it's letters added together.
Shift to the next word in question so we may repeat this process until there are no words left.
Lets say the word wasn't complete at this point.
First let's check to see if our currentSum of letters is a single digit.
If not, let's add the digits of the value together to make it a single digit.
If it is already a single digit, that's great! Let's go ahead and save our work under a different storage container so we can continue to use the old one which was ever so helpful to carry new values.
Let's also shift to the next letter of focus once more.
If we still have words to work with, we will continue doing all of the above until we do not.
When we don't have any words to work with, because the word I went to fetch resulted in a value of nothing there or 0,
I will print a friendly message to let the user know I'm done assigning values to everything and ready to begin the next step.
Now, as opposed to earlier, I will roll back through my flash cards of words 1 by 1, placing them in 1 of 9 piles my author believes are called arrays.
Each time I add a word to a pile, I will shift the word# backward 1 so I can sort a new word in question, until I am finished and left with no more words to sort.
At this point I let the user know I have sorted the words into categories (or arrays) and am about to place each array into it's own .txt document!
And exactly as promised, this is what I do. My author has chosen not to alert the user I've finished this step, for he believes it to take less than 10 seconds.
Fin.
You're welcomeBlake Boyd wrote:Thank you very much for the warm greeting!
. . .
In the future I will be learning (completely on my own accord w/o any help whatsoever!) . . .
You're welcomeBlake Boyd wrote:Thank you very much for the warm greeting!
. . .
Edit1: It won't allow me to edit the post, so I assume this means you have a nifty feature that removes the post from view . . . in the future I will edit it and add the answers . . . .
Campbell Ritchie wrote:
You're welcomeBlake Boyd wrote:Thank you very much for the warm greeting!
. . .
Edit1: It won't allow me to edit the post, so I assume this means you have a nifty feature that removes the post from view . . . in the future I will edit it and add the answers . . . .
You assume wrongly. We have a nifty feature which prevents non‑mods editing posts after a certain age. And there is a good reason for it. After a post has been replied to, any changes make the replies look like nonsense. Any new material belongs in a new post, please.
We don't delete posts unless we think there is something wrong with them, e.g. spam, offensive language. Duscussed here.Blake Boyd wrote: . . . Please delete my first post and the ones that came after . . . I will remove this message by Edit (moderator Request) . . .
Thank you.Blake Boyd wrote: . . . I really like the way this forum was designed. . . .
I ahv never heard of a setup or a single run loop. Do you mean a single‑line statement, or a constructor. You use constructors to initialise objects' state.A. What is the Java equivalent of a "setup" or single-run "loop" placed at the top of the program? (unknown)
Don't use float; use BigDecimal or if you can cope with imprecision double. You should find something about declarations in the Java Tutorials. It will be in the basics section somewhere.B. What is the Java equivalent of declaring a float, integer, and string variable? (unknown)
Yes; it should be in this tutorial somewhere.
D. Does java have a plugin or "library" that allows one to use simple commands to:
1. Load a .txt file, or word containing file of other extension? (above I use the format: load library(path to file);) (unknown)
You mean whether it is greater than 0 and less than 10?. . .
E. Does java allow you to check an integer variable to see if it is a single digit? If so, how? (above I use the format: if currentSum != 1digit) (unknown)
I had to do that as a beginner with the basic arithmetic operators: see first tutorial link somewhere. we had to get all the individual digits.G. Does Java allow one to break from a loop, for instance an if or else statement? If so can one break to the main loop? (above I use the format: break; or: break to void loop(); or break to looptitle();) (unknown)Yes, with break continue or their labelled versions, but I don't like those constructsF. If the prior question is yes, does Java have a command that allows you to split an int var into its separate digits for maths? (above I use the format: currentSum = the digits of currentSum added together; which is human speak) (unknown)
If you didn't come across that in the basic tutorial links, I shall be very surprised. Look for option pane in the tutorials.H. What are the various commands for printing a message, whether they be to window, cmd prompt window, or box with 'ok' prompt? (above I use the format: print "string") (unknown)
You should have seen an arrays section in the tutorials by now. Also look for the collections “trail”.
I. How can strings be stored consecutively or in any order for use at a later time? I believe these are called arrays, if so, how do they work in Java? (unknown)
You should have seen such a section in the tutorials by now.
J. Does java have a plugin or "library" (perhaps the same one asked for above) that allows one to save the values of a particular array (or string-storing block if they aren't called arrays) to a .txt document in the root directory of your program? (unknown)
Probably, but that sounds like bad use of Strings.
K. When embedding a variable inside a string, what is the proper syntax used so the program reads it correctly? (Above I use the format: wordorstring'variable'; where if 'variable' = 1, the machine reads wordorstring1) (unknown)
They are not called functions but methods. You should have seen that in the tutorials by now, otherwise myMethodName(...);. . .
M. What is the proper syntax for adding your own function (or loop) within the main loop? And how might one jump to it from a code block? (Above I use the format: functionorloopname() {})(to jump I simply list it: functionorloopname();)
t looks to me that your are biting off more than you can chew. You need to program the same way you eat an elephant.
. . .
I ahv never heard of a setup or a single run loop. Do you mean a single‑line statement, or a constructor. You use constructors to initialise objects' state.A. What is the Java equivalent of a "setup" or single-run "loop" placed at the top of the program? (unknown)
You mean whether it is greater than 0 and less than 10?. . .
E. Does java allow you to check an integer variable to see if it is a single digit? If so, how? (above I use the format: if currentSum != 1digit) (unknown)
I had to do that as a beginner with the basic arithmetic operators: see first tutorial link somewhere. we had to get all the individual digits.F. If the prior question is yes, does Java have a command that allows you to split an int var into its separate digits for maths? (above I use the format: currentSum = the digits of currentSum added together; which is human speak) (unknown)
If you didn't come across that in the basic tutorial links, I shall be very surprised. Look for option pane in the tutorials.H. What are the various commands for printing a message, whether they be to window, cmd prompt window, or box with 'ok' prompt? (above I use the format: print "string") (unknown)
Probably, but that sounds like bad use of Strings.K. When embedding a variable inside a string, what is the proper syntax used so the program reads it correctly? (Above I use the format: wordorstring'variable'; where if 'variable' = 1, the machine reads wordorstring1) (unknown)
They are not called functions but methods. You should have seen that in the tutorials by now, otherwise myMethodName(...);. . .
M. What is the proper syntax for adding your own function (or loop) within the main loop? And how might one jump to it from a code block? (Above I use the format: functionorloopname() {})(to jump I simply list it: functionorloopname();)
it looks to me that your are biting off more than you can chew. You need to program the same way you eat an elephant.
One thing you have to do when learning a new language: forget the old language. Otherwise it simply causes confusionBlake Boyd wrote: . . . But the arduino in particular has one . . .
and you have got me all embarrassed about that.You are a life-saver.
. . .
. . .It is surprising how one can trip over something simple. Everybody does that from time to time.Blake Boyd wrote: . . . LOL. I really did. . . .
On behalf of whoever wrote that FAQ, thank youA very helpful link.
The functionality you require is the same if you change language, but the syntax and idioms you use to achieve it are sometimes different. I have seen no end of confusion and errors because people think, “XXX means that in language Y, so it means the same in Java.” The language which seems to cause the most frequent confusion is C++, but I have seen dangerous confusions between Java and C#, too.. . . mere translation coming from my background into a new language, so I understood the functionality . . .
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |