Generating Random "Fake Latin" Strings, Part 2By Dave Cantrell
In Part 1 we looked at the
GetLatinSentence function, which generated fake Latin sentences. In this part we'll look at
GetLatinParas, which generates fake Latin paragraphs!
This function simplifies using the
GetLatinSentence() function. As with
GetLatinSentence(), we declare the function
and localize the inputs:
We also have a series of variables we should go ahead and set up now:
Now we start the loop. In here we (1) randomly determine the number of sentences in this paragraph, (2) build
each sentence using
GetLatinSentence, and (3) concatenate the result onto
I set the paragraph length here to a minimum of three and maximum of seven sentences.
Finally, return the string to the caller and close:
Anyways, hopefully these functions will help you out next time you need demo text in a hurry. It sure would have helped me! :D
latin.aspin text format