You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: examples/hot_reload/message.v
+9-5
Original file line number
Diff line number
Diff line change
@@ -6,20 +6,24 @@ import v.live
6
6
7
7
structApp {
8
8
mut:
9
-
x int
10
-
counterint
9
+
x int
10
+
cint
11
11
}
12
12
13
13
@[live]
14
14
fnprint_message(mut app App) {
15
15
i:= live.info()
16
-
println('OK reloads: ${i.reloads_ok:4d} | Total reloads: ${i.reloads:4d} | Hello! Modify this message while the program is running. app: ${voidptr(app)} | app.x: ${app.x:6} | app.counter: ${app.counter:6}')
17
-
// app.x = 99 // try changing this to another value, while the program is running ...
18
-
app.counter++
16
+
println('Hello! Modify this message. OK reloads: ${i.reloads_ok:2d} | Total: ${i.reloads:2d} | app: ${voidptr(app)} | app.c: ${app.c:4} | app.x: ${app.x:12}')
17
+
// app.x = app.x * 3 + 1 // try changing this to another value, while the program is running ...
0 commit comments