This is Part IV of a series of Tutorials on PEBL
The Print() and Print_() functions can be extremely useful in PEBL for debugging. You can print out the state of particular variables at different points during execution of a program, and help track down errors. But when using PEBL on windows, or from the launcher, this well get saved to a file you can examine. This can be useful, but sometimes it is useful to print out and see values of variables real-time.
For example, consider the following program, which attempts to create a list of numbers between 1 and 100:
define Start(p)
{
win <- MakeWindow()
i <- 1
list <- []
while (i <= 100)
{
list <- Append(list, i)
Print(i)
}
}
