sundar@1373: /* sundar@1373: * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. sundar@1373: * sundar@1373: * Redistribution and use in source and binary forms, with or without sundar@1373: * modification, are permitted provided that the following conditions sundar@1373: * are met: sundar@1373: * sundar@1373: * - Redistributions of source code must retain the above copyright sundar@1373: * notice, this list of conditions and the following disclaimer. sundar@1373: * sundar@1373: * - Redistributions in binary form must reproduce the above copyright sundar@1373: * notice, this list of conditions and the following disclaimer in the sundar@1373: * documentation and/or other materials provided with the distribution. sundar@1373: * sundar@1373: * - Neither the name of Oracle nor the names of its sundar@1373: * contributors may be used to endorse or promote products derived sundar@1373: * from this software without specific prior written permission. sundar@1373: * sundar@1373: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS sundar@1373: * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, sundar@1373: * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR sundar@1373: * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR sundar@1373: * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, sundar@1373: * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, sundar@1373: * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR sundar@1373: * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF sundar@1373: * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING sundar@1373: * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS sundar@1373: * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. sundar@1373: */ sundar@1373: sundar@1373: load(__DIR__ + "console.js"); sundar@1373: sundar@1373: console.log("consoleuse.js started!"); sundar@1373: sundar@1373: function func() { sundar@1373: console.count("func"); sundar@1373: } sundar@1373: sundar@1373: sundar@1373: func(); sundar@1373: func(); sundar@1373: func(); sundar@1373: func(); sundar@1373: sundar@1373: // java.io.Console method sundar@1373: console.readPassword("passworld please: "); sundar@1373: console.error("Big error: %s!", "you revealed your password!"); sundar@1373: console.warn("You've done this %d times", 345); sundar@1373: console.assert(arguments.length != 0, "no arguments!"); sundar@1373: sundar@1373: // java.io.Console methods sundar@1373: var str = console.readLine("enter something: "); sundar@1373: console.printf("you entered: %s\n", str); sundar@1373: