Is it possible to first pass a parameter to the function and than change its value?
#!/bin/bash
name=old_name
echo $name #echoes "old_name"
alter () {
$1=new_name #throws error that says 'command not found'
}
alter name
echo $name #I would like to see "new_name" here