# Translating Syntax Shorthand for Beginners?

**URL:** <https://discourse.processing.org/t/translating-syntax-shorthand-for-beginners/24995>\
**Category:** Beginners\
**Created:** [October 29, 2020, 3:56am UTC](https://discourse.processing.org/t/translating-syntax-shorthand-for-beginners/24995 "2020-10-29T03:56:16Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [October 31, 2020, 12:27am UTC](https://discourse.processing.org/t/translating-syntax-shorthand-for-beginners/24995/17 "2020-10-31T00:27:02Z")

</div>

@mnoble Look at what you started! `:)`

This topic inspired me to make the maze in P5.js.

Processing version:

> [@10 print chr$(205.5+rnd(1)); : goto 10](https://discourse.processing.org/t/10-print-chr-205-5-rnd-1-goto-10/15483/18):
>
> A bit leaner: size(500,500);int x=0,y=0;while(y\<height){int r=int(random(2))\*25;line(x+r,y,x+25-r,y+25);x+=25;if(x\>width){y+=25;x=0;}} size(500, 500); int x=0, y=0; while (y\<height) { int r=int(random(2))\*25; line(x+r, y, x+25-r, y+25); x+=25; if (x\>width) { y+=25; x=0; } }slight_smile

And P5.js version of this:

```auto
// https://10print.org/
// P5.js version of:
// 10 PRINT CHR$(205.5+RND(1)); : GOTO 10

n=25
setup=_=>{createCanvas(w=500,w)
x=y=0
while(y<w){r=int(random(2))*n
line(x+r,y,x+n-r,y+n)
x+=n
if(x>w){y+=n;x=0}}}

```

I removed the semicolons and used a line feed instead; each counts as a character.  
The n=25 did not make it smaller (still the same size) but left it in there for this example.

`:)`

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/d/d5fa8b8403e2e1b085355f82574e874de1ea7836.png)

---

_[View the full topic](https://discourse.processing.org/t/translating-syntax-shorthand-for-beginners/24995)._
