- 👋 Hi, I’m @miguelsilva5989
- 🧾 I've been working in IT since 2012 mostly as a Data Engineer/Business Intelligence consultant
- 👀 I’m interested in Python and Rust projects
- 🌱 I’m currently learning Rust
I am now developing my own meme 🙃 programming language FPS Lang in Rust
. Take a look and have fun 😊
// this is FRAME 0
print("printed at frame 1 - declared at frame 0");
let a = 0;
#3 // frame 1 content will be spread out accross the next 3 frames - but special attention to the for loop!
// this message will be printed out 3 times (at frames 2,3,4)
print("printed at frames 2|3|4 - declared at frame 1");
// each for loop iteration is a new frame, which means the inner loop statements will executed for 6 frames -> 3 (frames) * 2 (range 0..=1)
for 0..=1 {
print("printed at frames 2|3|4|5|6|7 - declared at frame 1 inside for loop");
a = a + 1;
print(a);
}
# // frame 4
print("printed at frame 5 - declared at frame 4");
print(a); // should print 4
##
output
FPS 1 -> printed at frame 1 - declared at frame 0
FPS 2 -> printed at frames 2|3|4 - declared at frame 1
FPS 2 -> printed at frames 2|3|4|5|6|7 - declared at frame 1 inside for loop
FPS 2 -> 1 // 'a' value - printed inside for loop
FPS 3 -> printed at frames 2|3|4 - declared at frame 1
FPS 3 -> printed at frames 2|3|4|5|6|7 - declared at frame 1 inside for loop
FPS 3 -> 2 // 'a' value - printed inside for loop
FPS 4 -> printed at frames 2|3|4 - declared at frame 1
FPS 4 -> printed at frames 2|3|4|5|6|7 - declared at frame 1 inside for loop
FPS 4 -> 3 // 'a' value - printed inside for loop
FPS 5 -> printed at frames 2|3|4|5|6|7 - declared at frame 1 inside for loop
FPS 5 -> 4 // 'a' value - printed inside for loop
FPS 5 -> printed at frame 5 - declared at frame 4
FPS 5 -> 4 // 'a' value - printed at frame 5 (declared at frame 4)
FPS 6 -> printed at frames 2|3|4|5|6|7 - declared at frame 1 inside for loop
FPS 6 -> 5 // 'a' value - printed inside for loop
FPS 7 -> printed at frames 2|3|4|5|6|7 - declared at frame 1 inside for loop
FPS 7 -> 6 // 'a' value - printed inside for loop