Changes for page 01 Lua Functions

Last modified by Theodore Xu on 2023/10/26 10:51

From version 5.11
edited by Stone Wu
on 2022/07/12 09:35
Change comment: (Autosaved)
To version 5.12
edited by Stone Wu
on 2022/07/12 09:40
Change comment: (Autosaved)

Summary

Details

Page properties
Content
... ... @@ -1300,10 +1300,11 @@
1300 1300  
1301 1301  [[http:~~/~~/w3.impa.br/~~~~diego/software/luasocket/http.html#request>>url:http://w3.impa.br/~~diego/software/luasocket/http.html#request]]
1302 1302  
1303 -== https request ==
1303 +== **https request** ==
1304 1304  
1305 1305  Example:
1306 1306  
1307 +{{code language="LUA"}}
1307 1307  local json = require("json")
1308 1308  
1309 1309  local https = require("https")
... ... @@ -1310,7 +1310,7 @@
1310 1310  
1311 1311  functions https_demo.main()
1312 1312  
1313 -local url = "https:~/~/XXXXXXXXXXXXXXXXXXXXXXXXXX"
1314 +local url = "https://XXXXXXXXXXXXXXXXXXXXXXXXXX"
1314 1314  
1315 1315  local body = {}
1316 1316  
... ... @@ -1343,6 +1343,7 @@
1343 1343  end
1344 1344  
1345 1345  end
1347 +{{/code}}
1346 1346  
1347 1347  (((
1348 1348  = **8 Internal register** =
... ... @@ -1350,32 +1350,32 @@
1350 1350  
1351 1351  The internal registers of the box are divided into bit addresses and word addresses, which can be accessed in two ways (taking HDW as an example):
1352 1352  
1353 -**~1. **Access by word, prefix @W_HDW,
1355 +**Access by word, prefix @W_HDW.**
1354 1354  
1355 1355  For example: @W_HDW0 represents the first word of the system data area, @W_HDW1 represents the second word of the system data area.
1356 1356  
1357 -**2. **Access in bit mode, the prefix is @B_HDX, the number in front of "." indicates the number of the word, and the number behind is the bit number of the word.
1359 +**Access in bit mode, the prefix is @B_HDX, the number in front of "." indicates the number of the word, and the number behind is the bit number of the word.**
1358 1358  
1359 1359  For example: @B_HDX1020.12, its meaning is to access the system data area in bit mode, the specific location is the 13th bit of the 1020th word.
1360 1360  
1363 +(% class="box errormessage" %)
1364 +(((
1361 1361  **✎Note: **
1366 +)))
1362 1362  
1363 -**~1. **The address in @B_HDX is taken from the word in @W_HDW, so pay special attention when using the address.
1368 +* The address in @B_HDX is taken from the word in @W_HDW, so pay special attention when using the address.
1369 +** For example, @B_HDX1020.12 is to access the 13th bit of the 1020th word. The value of this bit is the same as the word obtained by @W_HDW001020. The 13th bit of this word is actually the same bit as @B_HDX1020.12.
1370 +* The address of the bit address @B_HDX has a decimal point, while the word address is an integer.
1364 1364  
1365 -For example, @B_HDX1020.12 is to access the 13th bit of the 1020th word. The value of this bit is the same as the word obtained by @W_HDW001020. The 13th bit of this word is actually the same bit as @B_HDX1020.12.
1366 -
1367 -**2.**The address of the bit address @B_HDX has a decimal point, while the word address is an integer.
1368 -
1369 1369  (((
1370 -== **8.1 Data storage area(HDW/HDX)** ==
1373 +== **Data storage area(HDW/HDX)** ==
1371 1371  )))
1372 1372  
1373 1373  The system storage area (HDW) of the V-BOX is used to store temporary data:
1374 1374  
1375 -~1. Access by word, the number range is: "@W_HDW0"-"@W_HDW299999".
1378 +1. Access by word, the number range is: "@W_HDW0"-"@W_HDW299999".
1379 +1. Access in bit mode, the number range is: "@B_HDX0.0"-"@B_HDX299999.15".
1376 1376  
1377 -2. Access in bit mode, the number range is: "@B_HDX0.0"-"@B_HDX299999.15".
1378 -
1379 1379  (((
1380 1380  == **8.2 Special data area (HSW/HSX)** ==
1381 1381  )))