All BASIC

BASIC Developer & Support Resources => Translators => Nim => Topic started by: John on January 03, 2020, 02:46:44 PM

Title: Nim auto casting
Post by: John on January 03, 2020, 02:46:44 PM
It looks like Nim has an auto casting  / variant feature that relaxes the strict typing rules the language is based on. This is good news as I was feeling the restraints of a typed language with no way to glue stuff together.

Code: Text
  1. var a:string = "Nim"
  2. var b:int = 2
  3. var c:cstring = "C"
  4.  
  5. echo a & $b & $c
  6.  


ubuntu@rpi4b:~/guilc/nim-dev$ ./nim2c
Nim2C
ubuntu@rpi4b:~/guilc/nim-dev$