Windows installation

2017-10-20 Thread freeflow
Hi Just tried installing Nim following the directions from here [https://nim-lang.org/install_windows.html](https://nim-lang.org/install_windows.html) You _CAN_ do better than this. For example why are you not linking to

Re: Equivalent of VBA With structure

2020-02-05 Thread freeflow
@zevv, @cictycide. Thanks to both of you for your prompt offers of help. I've posted an example of the issues for both of you.

Re: Equivalent of VBA With structure

2020-02-01 Thread freeflow
Before and after with before proc vmJumpIfTrue(self: Computer) = if self.s.processor.memory1 != 0: self.s.processor.programCounter = self.s.processor.memory2 else: self.s.processor.programCounter = self.s.processor.programCounter + 3

Re: Equivalent of VBA With structure

2020-02-01 Thread freeflow
Stefan thanks for the prompt response. As ever, sometimes you just miss the key tag for searching. The With package seems to do the trick and hasremoved a huge amount of repetitive noise in object methods. I also tested Cascade but I experienced problems. I also followed up on inc but like +=

Equivalent of VBA With structure

2020-02-01 Thread freeflow
I'm having fun learning nim by converting Advent of Code solutions I wrote in VBA. In VBA you can shortcut long qualifiers using the With statement. Private Sub VmEquals() With s.Processor .Memory3 = IIf(.Memory1 = .Memory2, 1, 0)

Re: Equivalent of VBA With structure

2020-02-01 Thread freeflow
Sadly, having spent a little while scattering With's around some of my code it appears that there are issues. Consequently I'm reverting back to var x = y type statements

Newbie question: Why am I getting the too many variables error on my loop index variable?

2020-01-12 Thread freeflow
I'm currently having a bash at using nim by converting my efforts for Advent of Code from VBA to nim. Unfortunately I've got stuck when trying to iterate over the input from a file and push that input into an OrderedTable. proc GetDay02Program(): OrderedTable[int64,int64] =

Re: Newbie question: Why am I getting the too many variables error on my loop index variable?

2020-01-13 Thread freeflow
On further reading it seems there is a split proc and a split iterator. The former returns a sequence of substrings. The code I have seems to be using the iterator version. How would I indicate to nim to use the proc rather than the iterator version of split?

Re: Newbie question: Why am I getting the too many variables error on my loop index variable?

2020-01-13 Thread freeflow
Aha: success for myKey, myValue in readFile(day02PathAndName).split(',').pairs(): result[myKey.int64]=myValue.parseInt Run

Re: Newbie question: Why am I getting the too many variables error on my loop index variable?

2020-01-13 Thread freeflow
It might be more productive if I advise you that I spent several days perusing the nim documentation before I admitted defeat and asked a question here. @Solitude's comments highlighted something that is not adequately referenced when you read the for loop section of the manual.

Re: Newbie question: Why am I getting the too many variables error on my loop index variable?

2020-01-13 Thread freeflow
I'll have to wait until my knowledge of nim improves before I can that. In the meantime I'm using let mySeq:seq[string]=readFile(day02PathAndName).split(',') for myKey, myValue in mySeq: result[myKey.int64]=myValue.parseint.int64 Run