Skip to content

Commit 1657789

Browse files
Add another example for implied print
1 parent 1d69f78 commit 1657789

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

extension/example-notebooks/hello-world-idl.idlnb

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,22 @@
165165
"metadata": {},
166166
"outputs": []
167167
},
168+
{
169+
"type": "markdown",
170+
"content": [
171+
"Or you can just call a function and it the result will be printed out:"
172+
],
173+
"metadata": {},
174+
"outputs": []
175+
},
176+
{
177+
"type": "code",
178+
"content": [
179+
"findgen(10)"
180+
],
181+
"metadata": {},
182+
"outputs": []
183+
},
168184
{
169185
"type": "markdown",
170186
"content": [
@@ -271,6 +287,27 @@
271287
"metadata": {},
272288
"outputs": []
273289
},
290+
{
291+
"type": "markdown",
292+
"content": [
293+
"You can also mix-and-match routines with implied printing. Let's revisit our example cell that defined the function `foo`."
294+
],
295+
"metadata": {},
296+
"outputs": []
297+
},
298+
{
299+
"type": "code",
300+
"content": [
301+
"function foo2",
302+
" compile_opt idl2",
303+
" return, 'I told you it wasn''t that simple! But it''s also not rocket science.'",
304+
"end",
305+
"",
306+
"foo2()"
307+
],
308+
"metadata": {},
309+
"outputs": []
310+
},
274311
{
275312
"type": "markdown",
276313
"content": [

0 commit comments

Comments
 (0)