So I just got hold of a Teletype a few days ago. My experience of coding is limited to dabbling with some variants of BASIC in the early 80s, messing with bad HTML in the 90s and some basic SQL since then – so the whole scripting thing is something of challenge (albeit an enjoyable one).
Now I’ve run into a problem. Let’s say I’ve created a pattern
1 0 0 0
2 0 0 0
3 0 0 0
4 0 0 0
and the script
PN.L 0 3
TR.P 1; CV 1 N PN.NEXT 0
This runs up the pattern and sends TR & CV pairs with note values 1 2 3 4 1 2 3 4 etc. As an exercise, I’m trying to work out how to make it run up then down again - so that it outputs CV values 1 2 3 4 3 2 1 2 3 4 3 2 1 etc.
It’s driving me bonkers. 
I’ve tried loops, a second script containing a PN.PREV, some other stuff, and nothing seems to do the trick. Can someone give me a hint? What’s the best process to use to achieve this?