function twice(x)
return 2*x --return value (x)=2x
end
print("The Number Is :")
io.read("*number")--Read variable number
a = 4
print(twice(a))
--Output will be like this :
--The Number Is :
--8--Custom Prinit Location
function print(nr)
context=activity.getApplicationContext();
duration=Toast.LENGTH_SHORT;
toast=Toast.makeText(context, nr,duration);
toast.setGravity(Gravity.TOP,0,100)--| Gravity.TOP, 1, 40);--Set location
toast.show();
end
print("Hello There")