This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

250 byte string, position
#2
Set Additional class to pre, add this to Custom CSS:
Code:
.pre {
  white-space: pre;
  font-family: monospace;
}

Use string.format to keep values at the same position no matter how many digits they have. 10.3 means print at least 10 character and use 3 decimal places. If the number is larger then the following values will be shifted so adjust width as needed.
Code:
v1 = 1.234
v2 = 23.45
v3 = 345.6
v4 = 4567
text = string.format('%10.3fW %10.3fW %10.3fW %10.3fW', v1, v2, v3, v4)
Reply


Messages In This Thread
250 byte string, position - by Dré - 29.05.2022, 11:47
RE: 250 byte string, position - by admin - 30.05.2022, 06:45
RE: 250 byte string, position - by Dré - 31.05.2022, 18:29
RE: 250 byte string, position - by admin - 01.06.2022, 07:18
RE: 250 byte string, position - by Dré - 01.06.2022, 15:35
RE: 250 byte string, position - by admin - 01.06.2022, 15:40
RE: 250 byte string, position - by Dré - 01.06.2022, 15:54
RE: 250 byte string, position - by admin - 01.06.2022, 16:21

Forum Jump: