Author Topic: Nim auto casting  (Read 2070 times)

Offline John

  • Forum Support / SB Dev
  • Posts: 3597
    • ScriptBasic Open Source Project
Nim auto casting
« 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$