Re: difficulty with rectangular arrays

2021-06-11 Thread Moth via Digitalmars-d-learn
On Friday, 11 June 2021 at 08:40:51 UTC, jfondren wrote: The example in the spec is in a function body and you've copied it to a class body, where the writeln() would also be in error. I find https://dlang.org/spec/grammar.html quite hard to read but I imagine there's a state/declaration

difficulty with rectangular arrays

2021-06-11 Thread Moth via Digitalmars-d-learn
hullo all. i've encountered a bizzare inconsistency. the following is the [D spec on rectangular arrays](https://dlang.org/spec/arrays.html#rectangular-arrays): ``` void main() { import std.stdio: write, writeln, writef, writefln; double[6][3] matrix = 0; // Sets all elements to 0.

unicode characters are not printed correctly on the windows command line?

2019-12-21 Thread moth via Digitalmars-d-learn
hi all. been learning d for the last few years but suddenly realised... when i use this code: writeln('♥'); the output displayed on the windows command line is "ÔÖÑ" [it works fine when piped directly into a text file, however]. i've looked about in this forum, but all that i could find

Re: "lld-link: error: could not open libcmt.lib: no such file or directory"

2019-07-11 Thread moth via Digitalmars-d-learn
in case anyone else suffers from this in the future and is looking for a solution - redownloading visual studio 2017 and making sure the c++ workload was enabled fixed this for me. i'm not really sure why that worked, but i'm just happy to be able to learn again. trans rights! - moth

"lld-link: error: could not open libcmt.lib: no such file or directory"

2019-07-10 Thread moth via Digitalmars-d-learn
hi all! after a long while away, i thought i'd download the latest D release and give learning it another shot. unfortunately, it looks like i screwed up somewhere big time =[ it was working fine for me before [a few months ago i think], but now whenever i try to compile i get the message

Check Instance of Template for Parameter Type/Value

2015-10-19 Thread Stewart Moth via Digitalmars-d-learn
I'm working with a library that has template structs of mathematical vectors that can sometimes be the type of an array I'm passing to a function. The definition of the struct is like this: struct Vector(type, int dimension_){ ... } Where type is going to be an int/float/etc and dimension_