1

I am currently studying computing at UCLAN and I have to write a program using Spec# and I need a 2 dimensial jagged array which can not be null. I know for a normal array I can declare it like this

T![]!

but when i want to declare it for a jagged array I should write it somehow like this

T![]![]

This works pretty well but when I want to init it:

T![]![] = new T![365]![] 

it throws an error and I just can't find how to get this fixed.

OmG
  • 18,337
  • 10
  • 57
  • 90

1 Answers1

0

I did not find out how I can init the array correctly but I found a workaround.

T![]![]! = (T![]![]) new T![][];

This is how it works!