BBC BASIC for Windows
Programming >> BBC BASIC language >> Initialising Structures http://bb4w.conforums.com/index.cgi?board=language&action=display&num=1285393138 Initialising Structures
Post by Matt on Sep 25th, 2010, 05:38am
Hi, The BB4W help explains how to initialise arrays:
The BB4W help explains how to initialise arrays: But this doesn't seem to be the case with structures: Is this so, or am I missing something?
You're quite right. Arrays within structures have a different memory layout to 'regular' arrays, and none of the 'whole array' operations work with them. This is documented in the manual as follows: "Normally a structure member can be treated in exactly the same way as a simple variable of the same type. However this is not so in the case of operations on entire arrays or entire structures which cannot be used with structure members":