assignment of parameters within a function - pass by value?

I want to pass a list as a parameter in a function, sort it, and assign it to the original list.
That doesnt work. The list stays unchanged.
So the first say shows the original list.
The first think also shows the original list. Even it should have been changed in the function.
The assignment outside the function works then.
The last say then provides the result I would have expected from the assignment inside the function.

Dont tell me its ugly and I shouldnt do it otherwise. Sure. I am just trying to understand the issue and why assignments of a parameter in a function dont work.

NO! SNAP IS GREAT! Sometimes it needs a bit of CS background to understand issues, if you're trying weird things.

Yes, pass by value. The procedure's formal parameter para_liste is a variable local to that procedure. The SET command just changes that local variable. If you really want to make an outer variable subject to change by the procedure, you'd have to use a mutable data structure, e.g.,

set (list) to (LIST (list 1 2 -5 4 5))
sort list and assign test (list)

and then in the procedure, change the last line to

replace item 1 of para_liste with (temp_liste)