Advertisement
LockdateforGHS

Lua ids

Apr 23rd, 2021
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.37 KB | None | 0 0
  1. unpack string = true
  2.  
  3.  return string
  4.  
  5.     get(strings) stack in pairs()
  6.        return stack
  7.  
  8.       string(data)
  9.  print("strings loaded")
  10.  {{
  11.         local function = string in pairs(stacks)
  12.              unpack stacks
  13.             return strings
  14.                   get(data) for strings
  15.               ipairs(stack_overflow)
  16.            
  17.              end
  18.         end
  19.             local strings = ([
  20.         math.tan(tan)
  21.        
  22.        
  23.         math.random(4, 5, 8)
  24.         string1 = "Lua"
  25. print("\"String 1 is\"",string1)
  26.  
  27. string2 = 'string'
  28. print("String 2 is",string2)
  29.  
  30. string3 = [["data_string"]]
  31. print("String 3 is",string3)
  32.          return
  33.         end
  34.     end
  35.       table.insert
  36. mytable = {}
  37.  
  38.  
  39. mytable[1]= "table_1"
  40.  
  41.  
  42. mytable = nil
  43.  
  44.  
  45.   return tables
  46.  end
  47. end
  48.    
  49. require "printFormatter"
  50. printFormatter.simpleFormat("module")
  51.  
  52. -- Method 2
  53. local formatter = require "printFormatter"
  54. formatter.simpleFormat("module_e")
  55.  
  56. -- Method 3
  57. require "printFormatter"
  58. local formatterFunction = printFormatter.simpleFormat
  59. formatterFunction("us")
  60.  
  61.  return
  62.  end
  63. end
  64.  
  65.  
  66.  math.log('log')
  67.      
  68. -- lua spots
  69.  
  70.  
  71.  
  72.  
  73. radianVal = math.rad(math.pi / 2)
  74.  
  75. io.write(radianVal,"\n")
  76.  
  77. -- Sin value of 90(math.pi / 2) degrees
  78. io.write(string.format("%.1f ", math.sin(radianVal)),"\n")
  79.  
  80. -- Cos value of 90(math.pi / 2) degrees
  81. io.write(string.format("%.1f ", math.cos(radianVal)),"\n")
  82.  
  83. -- Tan value of 90(math.pi / 2) degrees
  84. io.write(string.format("%.1f ", math.tan(radianVal)),"\n")
  85.  
  86. -- Cosh value of 90(math.pi / 2) degrees
  87. io.write(string.format("%.1f ", math.cosh(radianVal)),"\n")
  88.  
  89. -- Pi Value in degrees
  90. io.write(math.deg(math.pi),"\n")
  91.  
  92.  return
  93.        
  94.  
  95.  
  96. optional_function_scope function function_name( argument1, argument2, argument3........,
  97. argumentn)
  98. function_body
  99. return result_params_comma_separated
  100. end
  101.        
  102.  
  103. function max(num1, num2)
  104.  
  105.    if (num1 > num2) then
  106.       result = num1;
  107.    else
  108.       result = num2;
  109.    end
  110.  
  111.    return result;
  112. end
  113.  
  114. -- calling a function
  115. print("The maximum of the two numbers is ",max(10,4))
  116. print("The maximum of the two numbers is ",max(5,6))
  117.  
  118.  
  119.  
  120.  
  121. splot_cells = true
  122.  
  123.  
  124.  return
  125.  
  126.  
  127. function average(...)
  128.    result = 0
  129.    local arg = {...}
  130.    for i,v in ipairs(arg) do
  131.       result = result + v
  132.    end
  133.    return result/#arg
  134. end
  135.  
  136. print("The average is",average(10,5,3,4,5,6))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement