欢迎图片

Changes for page Lua Script

Last modified by Devin Chen on 2025/11/10 16:04

From version 5.1
edited by xingzhi lin
on 2025/09/24 10:41
Change comment: There is no comment for this version
To version 6.2
edited by xingzhi lin
on 2025/10/31 10:41
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -628,12 +628,12 @@
628 628  Example:
629 629  
630 630  {{code language="Lua"}}
631 -print(we_bas_getstring("@W_HDW0", 10))
631 +print(we_bas_getstring("@W_HDW0", 10,0,0,0,0))
632 632  {{/code}}
633 633  
634 634  == [[we_bas_setstring>>||anchor="HAddressclass"]] ==
635 635  
636 -Prototype: we_bas_setstring(address, str [, len])
636 +Prototype: we_bas_setstring(address, str [, len, type, element4, element5, element6])
637 637  
638 638  Function: Write string
639 639  
... ... @@ -642,7 +642,37 @@
642 642  * address(string):address
643 643  * str(string):string
644 644  * len(number):length, if not set, it will be the bytes of the string
645 +* element4:element
645 645  
647 +|=(% style="width: 203px;" %)Value|=(% style="width: 967px;" %)Describe
648 +|(% style="width:203px" %)0|(% style="width:967px" %)Default
649 +|(% style="width:203px" %)1|(% style="width:967px" %)Forced prohibition of the use of the high-order function
650 +|(% style="width:203px" %)2|(% style="width:967px" %)Enable high and low character swapping
651 +|(% style="width:203px" %)3|(% style="width:967px" %)Enable high and low byte swapping
652 +|(% style="width:203px" %)4|(% style="width:967px" %)Gbk text, normal setting
653 +|(% style="width:203px" %)5|(% style="width:967px" %)Gbk text, the first byte is the string length
654 +|(% style="width:203px" %)6|(% style="width:967px" %)Endian-reversed type1: 12345678 -> 87654321
655 +|(% style="width:203px" %)7|(% style="width:967px" %)Endian-reversed type2: 12345678 -> 78563412
656 +|(% style="width:203px" %)8|(% style="width:967px" %)Endian-reversed type3: 12345678 -> 56781234
657 +|(% style="width:203px" %)9|(% style="width:967px" %)Endian-reversed type4: 12345678 -> 65872143
658 +|(% style="width:203px" %)10|(% style="width:967px" %)Endian-reversed type5: 12345678 -> 43218765
659 +|(% style="width:203px" %)11|(% style="width:967px" %)Characters are stored in one word
660 +|(% style="width:203px" %)12|(% style="width:967px" %)Unicode text
661 +
662 +* element5:element
663 +
664 +|=(% style="width: 203px;" %)Value|=(% style="width: 967px;" %)Describe
665 +|(% style="width:203px" %)0|(% style="width:967px" %)Default
666 +|(% style="width:203px" %)4|(% style="width:967px" %)Gbk text, normal setting
667 +|(% style="width:203px" %)5|(% style="width:967px" %)Gbk text, the first byte is the string length
668 +|(% style="width:203px" %)12|(% style="width:967px" %)Unicode text
669 +
670 +* element6:element
671 +
672 +|=(% style="width: 203px;" %)Value|=(% style="width: 967px;" %)Describe
673 +|(% style="width:203px" %)0|(% style="width:967px" %)Default
674 +|(% style="width:203px" %)11|(% style="width:967px" %)Characters are stored in one word
675 +
646 646  Return:
647 647  
648 648  * Success: true
... ... @@ -652,7 +652,7 @@
652 652  
653 653  {{code language="Lua"}}
654 654  local str = "Hello"
655 -we_bas_setstring("@W_HDW0", str)
685 +we_bas_setstring("@W_HDW0", str, 10, 0, 0, 0, 0)
656 656  {{/code}}
657 657  
658 658  == [[we_bas_bmov>>||anchor="HAddressclass"]] ==
... ... @@ -7813,6 +7813,23 @@
7813 7813  |crc16_arc|0x8005|0x0000|0x0000|true|true|123456789|0xBB3D
7814 7814  |crc32|0x04C11DB7|0xFFFFFFF|0xFFFFFFF|true|true|123456789|0xCBF43926
7815 7815  
7846 += LuaUserSecure =
7847 +
7848 +== user_secure.usersecure_getInfo ==
7849 +
7850 +== user_secure.usersecure_addInfo ==
7851 +
7852 +== user_secure.usersecure_deleteInfo ==
7853 +
7854 +== user_secure.usersecure_login ==
7855 +
7856 +== user_secure.usersecure_logout ==
7857 +
7858 +== user_secure.usersecure_updatepwd ==
7859 +
7860 += LuaChart =
7861 +
7862 +
7816 7816  = Environment operation =
7817 7817  
7818 7818  (% class="wikigeneratedid" id="HGetsqliteenvironment" %)