Skip to main content

Store a value to process dict (proc_put)

Declaration

old_value = proc_put(key, new_value)

Parameters

  • key
    String.
  • new_value
    String. The value to set.

Returns

  • old_value
    String. Returns the old value at this key. If none existed, returns an empty string.

Notes

  • All process dict entries whose keys start with "xxtouch." or "1ferver." are preserved.
  • Store a value into the process dictionary and return the previous value.
  • If the key had no previous value, an empty string is returned.
  • Storing an empty string clears the value for this key.

Example

local bill = ""
while bill == "" do
bill = proc_put("billno", "")
end
print("billno: ".. bill)