arraysvectorjulia

Creating a vector longer than 25 elements in Julia seems to fail


I've seen this error on Julia 1.10.2 and 1.10.4. The simple test case to reproduce this is to fire up Julia in command prompt and create a variable test=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]. The output is shown below. Note the junk character between 13 and 19. enter image description here

I'm new to Julia and am trying to run code from a collaborator. What I need to do right now is create a netlist. I'm used to python, so I'd refer to the netlist as a list of 4-tuples, the first three elements of which are strings. I'm making the netlist by making smaller sections and sticking them together with circuit=[circuit1; circuit2]. What I'm finding is that when the netlist gets too long, the function I'm feeding it into throws errors, and when I print the variable holding the netlist, I get enter image description here. That's 13 lines of netlist, junk character, then 12 lines of netlist - the same count as in the test case above.

What's the deal? Is this a bug in Julia?


Solution

  • Christoph nailed it, julia was just abbreviating the output and the regular windows command prompt didn't recognize the truncation symbol. The error I was getting from the function I was passing the netlist to was unrelated.

    If I want to see the full netlist, I can print(circuit), though the formatting isn't as pretty.