![]() Short so I won't get mad about typing it a bunch of times and am less likely to type it wrong and meaningful so I won't have trouble remembering what it means when I come back to it a few weeks later.īut why didn't I just write "Number of kids = 2"? Besides being long, this would cause an error and Praat would not finish the script, because it has restrictions on what a variable name can look like. I've chosen a name that is short and meaningful. Hopefully it's easy to guess that this variable represents "number of kids". This isn't really required, but is considered good style and supposedly improves readability of your code. Another thing is that there is a single space on either side of the assignment operator.Its job is to take values and assign them to variables. It doesn't really mean "equals", it's actually called the assignment operator. We use the "=" sign, although there's a subtle difference between the way we normally think of it and the way it's used here.In Praat's language this is a requirement. Secondly, note that the variable (age) is on the left hand side and the value (34) is on the right.no easy answer to that now, hang in there. ![]() When I first started learning to program, I found it hard to know what parts in a script were made up by the programmer, and what parts were built-in Praat commands. It might as well have been asdfg (although that's a stupid idea). There are a few key details to note here. which means we've made a container named "age" and have filled it with the number thirty-four. In programmer parlance, we've assigned the number 34 to a variable called "age". Variables are essentially containers that hold information. We will do that soon, but I think that will be much easier to explain and understand in a more profound way if we talk first about variables and data types in PraatĪ fundamental part of programming is manipulating variables. A lot of tutorials at this point would jump right in and start showing you shortcuts to start Praat programming, but please resist the urge.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |