viernes, 18 de septiembre de 2015

LED is my new Hello World - Falcon Time

Following my tradition...here's my LED Numbers app using Falcon...I used my Julia code as a base start...and I gotta say...the code is pretty much the same...which is nice for now...but I hope to find some hidden and weird features as I learn more about Falcon -;)

Here's the source code...

LED_Numbers.fal
leds =  ["0" => [" _  ","| | ","|_| "],
         "1" => ["  ","| ","| "],
         "2" => [" _  "," _| ","|_  "],
         "3" => ["_  ","_| ","_| "],
         "4" => ["    ","|_| ","  | "],
         "5" => [" _  ","|_  "," _| "],
         "6" => [" _  ","|_  ","|_| "],
         "7" => ["_   "," |  "," |  "],
         "8" => [" _  ","|_| ","|_| "],
         "9" => [" _  ","|_| "," _| "]]
   
print("Enter a number: ")
number = input()
len = number.len()
for i in [0:3]
 for j in [0:len]
  print(leds[number[j]][i])
 end
 printl("")
end

And of course...here are the pictures...



Greetings,

Blag.
Development Culture.

No hay comentarios: