zoukankan      html  css  js  c++  java
  • 通过lua自带例子学习lua 08 (3638)

    -- Example 36 -- Standard Libraries - operating system facilities.

    -- OS functions:
    -- os.clock, os.date, os.difftime, os.execute, os.exit, os.getenv,
    -- os.remove, os.rename, os.setlocale, os.time, os.tmpname
    
    print(os.date())
    
    
    -------- Output ------
    
    04/06/13 16:30:52

    -- Example 37 -- External Libraries.

    -- Lua has support for external modules using the 'require' function
    -- INFO: A dialog will popup but it could get hidden behind the console.
    
    require( "iuplua" )
    ml = iup.multiline
    {
    expand="YES",
    value="Quit this multiline edit app to continue Tutorial!",
    border="YES"
    }
    dlg = iup.dialog{ml; title="IupMultiline", size="QUARTERxQUARTER",}
    dlg:show()
    print("Exit GUI app to continue!")
    iup.MainLoop()
    
    
    -------- Output ------
    
    Exit GUI app to continue!
    -- Example 38   --[[
    
     To learn more about Lua scripting see
    
     Lua Tutorials: http://lua-users.org/wiki/TutorialDirectory
    
     "Programming in Lua" Book: http://www.inf.puc-rio.br/~roberto/pil2/
    
     Lua 5.1 Reference Manual:
         Start/Programs/Lua/Documentation/Lua 5.1 Reference Manual
    
     Examples: Start/Programs/Lua/Examples
    ]]
  • 相关阅读:
    Unique Binary Search Trees 解答
    Unique Paths II 解答
    Unique Paths 解答
    Maximum Subarray 解答
    Climbing Stairs 解答
    House Robber II 解答
    House Robber 解答
    Valid Palindrome 解答
    Container With Most Water 解答
    Remove Duplicates from Sorted List II 解答
  • 原文地址:https://www.cnblogs.com/sdlypyzq/p/3002591.html
Copyright © 2011-2022 走看看