The New C Standard- P11

Tham khảo tài liệu 'the new c standard- p11', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Compound literals 1058 Commentary All objects defined outside the body of a function have static storage duration. The storage for such objects is initialized before program startup so can only consist of constant expressions. This constraint only differs from an equivalent one for initializers by being framed in terms of occurring outside the body of a function rather than an object that has static storage duration. 1065 compound literal outside function body 455 static storage duration 151 static storage duration initialized before Semantics startup 1644 initializer static storage duration object 1057 A postfix expression that consists of a parenthesized type name followed by a brace-enclosed list of initializers compound literal is a compound literal. Commentary Thio HaIinpc fltA tprrri z itMnm w liters ll A rtmrtrtinii l litAfol rliffAre fr Am on initiqIi zat lict in fliot it pqh appiu 1641 initialization This defines the terrrr co mpound literal. a compound literal diners from an initializer list in that it can occur syntax outside of an object definition. Because their need be no associated type definition a type name must be specified for initializers the type is obtained from the type of the object being initialized . Other Languages A form of compound literals are supported in some languages . Ada Algol 68 CHILL and Extended Pascal . These languages do not always require a type name to be given. The type of the parenthesized list of expressions is deduced from the context in which it occurs. Coding Guidelines 1066 compound From the coding guideline point of view the use of compound literals appears fraught with potential pitfalls literal inside function including the use of the term compound literal which suggests a literal value not an unnamed object. l06l comnOund 1061 compoun literal However this construct is ne v in -99 and nrere is not yet sufficient experience in their use to K ivw if any is lvalue specific guideline recommendations might

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.