Thread: ANSI/ISO Standard

  1. #1
    In The Light
    Join Date
    Oct 2001
    Posts
    598

    ANSI/ISO Standard

    howdy,
    i am using borland builder 5 to learn C++ in the windoze world, in the book i have it refers to functions that are part of the package but "are not defined by the ANSI/ISO standard", im guessing they are probably specific only to the borland libraries.
    are these functions breaking some kind of cardinal rule of C++?
    will apps written using these functions work as well as apps written using only ANSI/ISO defined functions?

    M.R.

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    The question is of portability. If you write a program using these implementation dependent libraries then your program will break when you try to compile it on another compiler or system. One of the attributes of C++ is its ability to be ported across many platforms without change, but that's only if you write a program using ISO standard C++.

    -Prelude
    My best code is written with the delete key.

  3. #3
    In The Light
    Join Date
    Oct 2001
    Posts
    598

    example

    howdy,
    here is one example of what this book says.
    You can specify a range inside of a scanset using a hyphen. For example, this tells scanf() to accept the characters "A" through "Z".

    %[A-Z]

    The use of the hyphen to describe a range is not defined by the ANSI/ISO C standard. However,it is nearly universally accepted.
    does this mean it is an acceptable "style" and that it breaks ANSI/ISO standard rules?

    M.R.

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    That range flag for scanf is implemented on many compilers, but not all. That's what they mean. A standard construct is guaranteed to be available everywhere that C++ is supported.

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Standard efficiency
    By Jorl17 in forum C Programming
    Replies: 3
    Last Post: 06-18-2009, 11:48 AM
  2. Bug in iterator comparison in C++ standard?
    By steev in forum C++ Programming
    Replies: 14
    Last Post: 07-12-2008, 12:02 AM
  3. Abstract Base Class and References
    By Thantos in forum C++ Programming
    Replies: 9
    Last Post: 10-13-2004, 01:35 PM
  4. im extreamly new help
    By rigo305 in forum C++ Programming
    Replies: 27
    Last Post: 04-23-2004, 11:22 PM
  5. include question
    By Wanted420 in forum C++ Programming
    Replies: 8
    Last Post: 10-17-2003, 03:49 AM