Tuesday, July 30, 2019

Learning CL: Day 5

It's amazing how many times I have to read, re-read, re-re-read before things start to sink in. (Haha sink get it?)

Syntax/structure I've gotten so far:
  1. Label all components you intend to use as a source eg note1, exp2, table1 etc
  2. Script goes in the gearbox of whichever component you want to be the sink
  3. Script starts with the data type for that sink, which could be a word like content, number, function, cellContent.....etc then that is followed by a colon
  4. Next you put the name of the component that you want to be the source eg exp1, note1, table2 etc, followed by a dot
  5. After the dot you specify the type of data you want to extract from the source (bc it could contain more than one type of data) so that could be numericValue, content, latex, cellContent(1,2) etc
So a script starts out talking about the sink, then ends talking about the source. The script says "This is what's going here and this is where I'm getting it from."

To confirm this, I've gone through a few samples of CL from the CL doc and from Jocelyn's collection, to trace this pattern. (Some of these examples have um other stuff besides what I've listed above):

Data type of the sink at the beginning of the script, followed by a colon:



The name of the component from which something will be extracted, followed by a dot:

In the first example, what's in the quotation marks is, I guess, the source. This must mean that no matter what happens, Hello! I'm the computation layer! is what will be displayed. Similar to the third example, in which the variables m and b will only ever take on the values 1.5 and 2.


 Finally, the type of data being extracted from the source:

I'm seeing a LOT of examples involving variables, in which instead of a colon, there's an equals sign. There must be something to this variables thing. I don't think you can really do much without variables.

That's it for today. Back on vacay.

No comments:

Post a Comment