Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why I am getting illegal pattern on pattern matching?

1> X = 10.
10
2> Y = 9.
9
3> X - 1 = Y.
* 1: illegal pattern
4> Y = X - 1.
9
5> 10 - 1 = Y.
9

Can you explain to me what illegal pattern in query 3> is? Thanks!

like image 263
moon2sun00 Avatar asked Sep 06 '15 01:09

moon2sun00


1 Answers

The variable that you are binding to needs to be on the left side, not the right.

This is the correct expression:

Y = X - 1.
like image 97
nu-ex Avatar answered Oct 07 '22 13:10

nu-ex