[BLACKBOX] FW: [BLACKBOX] Variable initialization in BlackBox

From: Campbell, Robert (SELEX GALILEO, UK) <Robert.D.Campbell{([at]})nowhere.xy>
Date: Thu, 9 Oct 2008 08:46:27 +0100

----boundary-LibPST-iamunique-1627686247_-_-
Content-type: text/plain

>> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
>> Of CFB Software, Chris Burrows
 

>> However, this is not necessary. An alternative approach is
>> used by the Gardens Point implementation of Component
>> Pascal. Their compiler does very thorough program flow
>> analysis and is able to warn at compile time if a value is
>> not initialised. Unfortunately it is over-zealous as it also
>> complains about the variables that are automatically
>> initialised

As far as I know the BlackBox Menu Item 'Info->Analyze Module'
gives warnings about using uninitialised viables. I think that
the analyzer is (*very*) useful, although not perfect.

I also like the way its use is optional - I don't want to see all
its warnings every time I do a compile.

>> Having said all that, I am happy with the way variable
>> initialisation is already handled in BlackBox - it is a good
>> compromise between efficiency and sparing the programmer
>> some additional coding effort.

I also like the BBox compromise. The report is, (I think !) unambiguous
about what is initialised and when. But maybe it could be have been
a bit clearer?

Regards

Robert

 

SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1627686247_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7f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vbiwgRXNz
ZXggU1MxNCAzRUxccGFyDQpBIGNvbXBhbnkgcmVnaXN0ZXJlZCBpbiBFbmdsYW5kICYgV2FsZXMu
ICBDb21wYW55IG5vLiAwMjQyNjEzMlxwYXINCioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXHBhcg0KVGhpcyBlbWFpbCBh
bmQgYW55IGF0dGFjaG1lbnRzIGFyZSBjb25maWRlbnRpYWwgdG8gdGhlIGludGVuZGVkXHBhcg0K
cmVjaXBpZW50IGFuZCBtYXkgYWxzbyBiZSBwcml2aWxlZ2VkLiBJZiB5b3UgYXJlIG5vdCB0aGUg
aW50ZW5kZWRccGFyDQpyZWNpcGllbnQgcGxlYXNlIGRlbGV0ZSBpdCBmcm9tIHlvdXIgc3lzdGVt
IGFuZCBub3RpZnkgdGhlIHNlbmRlci5ccGFyDQpZb3Ugc2hvdWxkIG5vdCBjb3B5IGl0IG9yIHVz
ZSBpdCBmb3IgYW55IHB1cnBvc2Ugbm9yIGRpc2Nsb3NlIG9yXHBhcg0KZGlzdHJpYnV0ZSBpdHMg
Y29udGVudHMgdG8gYW55IG90aGVyIHBlcnNvbi5ccGFyDQoqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxwYXINClxwYXIN
ClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNjcmliZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0aCBib2R5
ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VSVkBMSVNUUy5PQkVST04uQ0h9fQB1Y3Qt
----boundary-LibPST-iamunique-1627686247_-_---
Received on Thu Oct 09 2008 - 09:46:27 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:53 UTC