standards

What does mean for a name or type to have a certain language linkage?

淺唱寂寞╮ 提交于 2019-12-02 19:01:44
According to (c) ANSI ISO/IEC 14882:2003, page 127: Linkage specifications nest. When linkage specifications nest, the innermost one determines the language. A linkage specification does not establish a scope. A linkage-specification shall occur only in namespace scope (3.3). In a linkage-specification, the specified language linkage applies to the function types of all function declarators, function names, and variable names introduced by the declaration(s). extern "C" void f1(void(*pf)(int)); // the name f1 and its function type have C language // linkage; pf is a pointer to a C function

Can you use multiple .JS files when developing a complex Javascript application?

喜欢而已 提交于 2019-12-02 18:01:44
Coming from a C# background where every class is (best practices) stored in its own individual file, it makes development quite clean. I've never written anything complex in Javascript in the past, but I am starting to learn HTML 5 and I want to write a complex game using the HTML 5 canvas. Putting all of my functions and code into a single .js file seems very messy. Is there a way to split it up, or a tool/IDE that lets you develop using separate files and compile them into a single one for deployment? I guess I am looking for some best practice advice. Questions like this generally seem to

subexpressions evaluation order

我是研究僧i 提交于 2019-12-02 17:32:08
问题 I've looked at SO/IEC 9899:201x under J.1 Unspecified behavior: "The order in which subexpressions are evaluated and the order in which side effects take place, except as specified for the function-call (), &&, ||, ?:, and comma operators (6.5)." Does this means that in func1() + func2(); func2() may be preformed before func1(), or even during func1() ? 回答1: In the current standard (ISO/IEC 9899:1999) there is a sequence point between function calls but the order of evaluation of the operands

Android layout examples that match “Metrics and Grids” recommendations

血红的双手。 提交于 2019-12-02 17:27:21
After trying to make sense of the Metrics and Grids page of the (fairly new) Android Design website, I gave up on a lot of things. So, basically, I'm trying to find the original layouts that are used in Android 4, so that I can apply the same concepts. To make this question more objective and not fail under the "too broad" axe of stackoverflow, I ask you for the layout that is used to recreate, exactly and fully , the examples on that page. Did Google provide them in the samples? Maybe a well known didactic repository that strives to conform with standards? Just as an example, it's not clear

Is the C programming language object-oriented?

ε祈祈猫儿з 提交于 2019-12-02 16:34:00
I was talking with a co-worker about C and C++ and he claimed that C is object-oriented, but I claimed that it was not. I know that you can do object-oriented-like things in C, but C++ is a true object-oriented language. What are your thoughts? Also, it triggered discussion on who decides what it means to be object-oriented and that it's tough to say what object-oriented really officially means. What are you thoughts on this? If by "is C object oriented?" you mean "is C designed with facilities specifically to support object oriented programming?" then, no, C is clearly not object oriented.

How to track newer C++ std documents of given topic?

家住魔仙堡 提交于 2019-12-02 15:38:18
Following is a C++ std document. The document number is N3721, which superseded the older N3634. Obviously, it's easy to track older documents of given topic. However, my question is: How to track newer documents of given topic? For example, if N3721 is superseded by a newer document, how to track the newer one? Shafik Yaghmour For the newer proposals (ones that start with the letter P ) you can use wg21.link redirect service to obtain the latest document: wg21.link - WG21 redirect service. Usage: wg21.link/nXXXX wg21.link/pXXXXrX Get paper. wg21.link/pXXXX Get latest public revision of paper.

What does the C++ standard mean regarding object lifetime begins?

假如想象 提交于 2019-12-02 15:03:28
问题 In the n3690 C++ standard in section 3.8.1 there is this text: The lifetime of an object of type T begins when: — storage with the proper alignment and size for type T is obtained, and — if the object has non-trivial initialization, its initialization is complete. Assume that there is a user defined constructor. What does the last sentence mean? Is it when the initializer list has finished initializing or is it when constructor body has finished running? Or does the last sentence mean

subexpressions evaluation order

我怕爱的太早我们不能终老 提交于 2019-12-02 10:36:44
I've looked at SO/IEC 9899:201x under J.1 Unspecified behavior: "The order in which subexpressions are evaluated and the order in which side effects take place, except as specified for the function-call (), &&, ||, ?:, and comma operators (6.5)." Does this means that in func1() + func2(); func2() may be preformed before func1(), or even during func1() ? In the current standard (ISO/IEC 9899:1999) there is a sequence point between function calls but the order of evaluation of the operands to + is not specified so func1 may be called before or after func2 but the function calls must not overlap

What does the C++ standard mean regarding object lifetime begins?

*爱你&永不变心* 提交于 2019-12-02 09:38:35
In the n3690 C++ standard in section 3.8.1 there is this text: The lifetime of an object of type T begins when: — storage with the proper alignment and size for type T is obtained, and — if the object has non-trivial initialization, its initialization is complete. Assume that there is a user defined constructor. What does the last sentence mean? Is it when the initializer list has finished initializing or is it when constructor body has finished running? Or does the last sentence mean something else? 12.6.2, [class.base.init], item 6, lists the steps of initialization, and this is the final

SHARED option in OPEN Statement in the Fortran standard

佐手、 提交于 2019-12-02 08:49:19
问题 In this documentation HP Fortran doc, the OPEN statement accept SHARED and READONLY options. In this documentation Standard Fortran 2008 doc, the OPEN statement dosn't accept SHARED or READONLY options. Since I'm using gfortran comes with gcc 4.4.7 to compile a Fortran source file on Linux,I used a ruse to get around half the problem. I used OPEN(...,ACTION=READ,...) instead of READONLY. But can't find an other ruse (:)) to replace SHARED Option. (Like Something=Shared ). Anyone have a ruse