I have defined some single character string constants which sit in their own 
'chars.nim' file.
    
    
    const    twHat*                  : string = "^"
    const    twBar*                  : string = "|"
    const    twComma*                : string = ","
    const    twPeriod*               : string = "."
    const    twSpace*                : string = " "
    const    twHyphen*               : string = "-"
    const    twColon*                : string = ":"
    const    twSemiColon*            : string = ";"
    const    twHash*                 : string = "#"
    const    twPlus*                 : string = "+"
    const    twAsterix*              : string = "*"
    const    twLParen*               : string = "("
    const    twRParen*               : string = ")"
    const    twRAngle*               : string = ">"
    
    
    
    Run

When I compile I'm seeing a single error but I cannot work out the cause.
    
    
    : used config file 
'C:\Users\XXXXXX\.choosenim\toolchains\nim-#devel\config\nim.cfg' [Conf]
    Hint: used config file 
'C:\Users\XXXXXX.choosenim\toolchains\nim-#devel\config\config.nims' [Conf]
    
.....................................................................................................
    C:\Users\XXXXXXc\source\repos\AdventOfCode\Nim\nim2022\src\chars.nim(25, 
45) Error: type mismatch: got 'string' for '"#"' but expected 'char'
    
    
    
    Run

output of nim -v is
    
    
    Nim Compiler Version 1.9.1 [Windows: amd64]
    Compiled at 2022-12-25
    Copyright (c) 2006-2022 by Andreas Rumpf
    
    active boot switches: -d:release
    
    
    Run

Please note that I am an extreme novice when it comes to setting up VSCode for 
working with nim.

Reply via email to