FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
daScript/examples/tutorial/tutorial09.das at master · ilyabelow/daScript · GitHub
ilyabelow
/
daScript
Public
forked from
GaijinEntertainment/daScript
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
daScript
/
examples
/
tutorial
/
tutorial09.das
Copy path
More file actions
More file actions
Latest commit
History
History
History
27 lines (21 loc) · 582 Bytes
Breadcrumbs
daScript
/
examples
/
tutorial
/
tutorial09.das
Copy path
File metadata and controls
27 lines (21 loc) · 582 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// options persisten_heap // this option is not necessary, we are setting this up from the C++ side
require
tutorial_09
var
count
=
0
class
Foo
def
Foo
print("creating new Foo\n")
def
bar
print("from Foo::bar\n")
[
export
]
def
test
count ++
if count == 1
print("FIRST CALL:\n")
// first time call - we create lambda
var
f
=
new
Foo
()
set_lambda() <|
@
// this lambda captures f, so it stays on heap. we have no other references to f
f->bar()
elif count == 2
pass
else
pass
Back
|
FazBrowse Home
|
New Git URL