How do I read command-line arguments in Nim? More specifically how I'd do this in nim:
e.g In rust I'd something like this:
let args: Vec<String> = env::args().collect();
let num1 = &args[1];
let operator = &args[2];
let num2 = &args[3];
e.g practical: <something.rs> 12 + 34I mean his specific usage can be done with commandLineParams:
import os
let
args = commandLineParams()
num1 = args[0]
operator = args[1]
num2 = args[2]
Or by using paramStr directly:
import os
let
num1 = paramStr(1)
operator = paramStr(2)
num2 = paramStr(3)