import strutils, os, procedures, terminal var argument: string if paramCount() > 0: argument = toLowerAscii(paramStr(1)) let args = [paramStr(0).splitPath.tail, paramStr(0), argument] if "dot" in args or "d" in args: dot() elif "cross" in args or "c" in args: cross() elif "scalar" in args or "s" in args: scalar() else: styledEcho resetStyle, "Would you like to preform the ", styleBright, "dot", resetStyle, ", ", styleBright, "cross ", resetStyle, "or ", styleBright, "scalar ", resetStyle, "product?" case toLowerAscii(readLine(stdin)): of "dot", "d", "1": dot() of "cross", "c", "2": cross() of "scalar", "s", "3": scalar() else: styledEcho fgRed, "Invalid operation!" quit QuitFailure