mirror of
https://github.com/fverdugo/XM_40017.git
synced 2025-11-24 09:24:32 +01:00
Publish 3 first notebooks
This commit is contained in:
@@ -586,6 +586,41 @@
|
||||
"x"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "4fc5eb9b",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### References\n",
|
||||
"\n",
|
||||
"As you can see variables are passed \"by value\". Passing variables \"by reference\" is done using a reference.\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "6ef5fe2c",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"function q!(x)\n",
|
||||
" x[] = 2\n",
|
||||
" x\n",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "ba245808",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"x = Ref(1)\n",
|
||||
"q!(x)\n",
|
||||
"x[]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "d20bc3a4",
|
||||
@@ -1608,9 +1643,7 @@
|
||||
"source": [
|
||||
"# License\n",
|
||||
"\n",
|
||||
"TODO: replace link to website\n",
|
||||
"\n",
|
||||
"This notebook is part of the course [Programming Large Scale Parallel Systems](http://localhost:8000/) at Vrije Universiteit Amsterdam and may be used under a [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) license."
|
||||
"This notebook is part of the course [Programming Large Scale Parallel Systems](https://www.francescverdugo.com/XM_40017/) at Vrije Universiteit Amsterdam and may be used under a [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) license."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user