Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Learn to tango with D discussion

Posted: 12/08/09 13:37:43

Hi, i am going through this book "Learn to tango with D" published by Apress. I am learning Structs and on 59th page of this book. There is a topic Static Initialization of structs. "static Time t = {7, -2}" And dynamic initialization is described only as t.hours = 7 & t.timeZone = -2. I also tried "Time t = {7, -2}" and is working fine. Than it was expected to me "Time t = {hours: 7, timeZone: -2}" should also work. But that needs to define t as a static. So "Time t = {7, -2}" should be treated as dynamic initialization. No?

Please correct me if i am wrong some where. Thanks

There are no responses to display.