New to PS, but experienced in software engineering, and used to procedural and OO languages, most recently Ada, which is based a lot on Pascal, are are C and other languages. Procedural programs often have a main loop which basically controls the overall program flow and provide user entry and exit to the program.
- Would it be reasonable to think of the PS pipe (ing) capability as something like steps or blocks of code in a procedural language’s main flow, functions or procedures (even if I don’t declare a function within PS, I can have steps that are function like. Though I read best practice seem to be to group code into logical functions, like most programming. It seems pipe (ing) will be necessary for many, many blocks of code or function procedure like steps, whether they are programmed as formal functions or procedures.
2)What is a good source for understanding the scope, visibility, and lifetime of PS’s objects, and user defined variables (which are objects too?)?
- Can I pipe, not to an out-file, but to a function or variable within an overall script, providing my functions and variables are declared before us. And, need I only declare, specify a functions before it is used, but not necessarily at the beginning of a script?