[OT-ish] How regular is pseudocode?

Bob Sneidar bobsneidar at iotecdigital.com
Mon Nov 2 13:50:13 EST 2015


The problem I forsee with this is that in order to write the pseudocode with enough detail to parse ito regular code, it would be so close already that you may as well have just written the code in the first place. Livecode Script almost reads like Pseudocode. This might be useful for other more complex languages with rigid structure, but I do not think LC would benefit from it. 

How would you account for nested control structures? I can write:

if the highlight of this button is on then turn it off otherwise turn it on

but what if I need to put a case statement inside the one condition and a repeat loop inside of the other? What if there are several if statements I want to evaluate? 

if condition a then
...
else if condition b then
... 
otherwise
...

By the time you account for these sorts of scenarios, you code is almost written in LC script anyway. 

My 2¢
Bob S


> On Nov 2, 2015, at 10:33 , Matt Maier <blueback09 at gmail.com> wrote:
> 
> Note: it's page 41 in the menu bar, but page 27 in the document.
> 
> I'm only dangerous in Livecode, but the code in Listing 5.3 looks like
> actual code to me, not pseudocode. By definition, if it's pseudocode then
> isn't it too vague to be used as actual code? And what good is code, pseudo
> or not, if it references mysterious functions?
> 
> Pseudocode should be easier to write and read since a human can fill in the
> missing pieces for themselves. If you had a set of rules for writing
> pseudocode, such that it could be parsed into a high-level language like
> Livecode, then wouldn't you simply have an even higher-level language?
> 
> On Mon, Nov 2, 2015 at 9:31 AM, Richmond <richmondmathewson at gmail.com>
> wrote:
> 
>> IFF pseudocode has rules as to how it should be written it should not
>> be that difficult to write a series of routines inwith LiveCode to import
>> pseudocode written (say) in an RTF document and transpose it into
>> LiveCode script.
>> 
>> ?????
>> 
>> Inspired by reading this:
>> https://project.dke.maastrichtuniversity.nl/games/files/msc/MasterThesisCarcassonne.pdf
>> 
>> page 41
>> 
>> Richmond.
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list