Logo
Explore Help
Register Sign In
open-autonomous-connection/luaj
1
0
Fork 0
You've already forked luaj
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
2281d056ecf5f954dcc6f99a24fc90ce9f694757
luaj/src/test/res/test7.lua

15 lines
290 B
Lua
Raw Normal View History

Initial draft of luajava package support.
2007-06-19 05:17:07 +00:00
obj = luajava.newInstance("java.lang.Object")
print( obj )
obj = luajava.newInstance("SampleClass")
print( obj )
obj.s = "Hello"
print( obj.s )
Refactor call stack and its use throughout. CallFrame now does all bytecode processing, and the callframe is reinitialized anytime something might have changed, like a function call.
2007-06-27 06:43:33 +00:00
print( obj:getS() )
Initial draft of luajava package support.
2007-06-19 05:17:07 +00:00
Refactor call stack and its use throughout. CallFrame now does all bytecode processing, and the callframe is reinitialized anytime something might have changed, like a function call.
2007-06-27 06:43:33 +00:00
obj:setS( "World" )
Initial draft of luajava package support.
2007-06-19 05:17:07 +00:00
print( obj.s )
Fix two bugs in LuaJava compatibility addon: (1) LDouble to Double/double coercions were missing (2) LuaJava.LMethod.luaStackCall adjusted the top of stack in a way that produces the wrong results when the call occurs as the argument to another function (such as print) Also added two lines to the bottom of test7.lua to test luajava.bindClass.
2007-07-04 03:23:09 +00:00
math = luajava.bindClass("java.lang.Math")
print("Square root of 9 is", math:sqrt(9.0))
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.3 Page: 28ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API