欢迎图片

Changes for page Lua Script

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

From version 3.3
edited by xingzhi lin
on 2025/09/24 10:38
Change comment: There is no comment for this version
To version 5.3
edited by xingzhi lin
on 2025/10/31 09:58
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -591,7 +591,7 @@
591 591  * type(number):type,type=1 is write-through
592 592  * element4:element
593 593  
594 -|(% style="width:203px" %)Value|(% style="width:967px" %)Describe
594 +|=(% style="width: 203px;" %)Value|=(% style="width: 967px;" %)Describe
595 595  |(% style="width:203px" %)0|(% style="width:967px" %)Default
596 596  |(% style="width:203px" %)1|(% style="width:967px" %)Forced prohibition of the use of the high-order function
597 597  |(% style="width:203px" %)2|(% style="width:967px" %)Enable high and low character swapping
... ... @@ -608,12 +608,18 @@
608 608  
609 609  * element5:element
610 610  
611 +|=(% style="width: 203px;" %)Value|=(% style="width: 967px;" %)Describe
612 +|(% style="width:203px" %)0|(% style="width:967px" %)Default
613 +|(% style="width:203px" %)4|(% style="width:967px" %)Gbk text, normal setting
614 +|(% style="width:203px" %)5|(% style="width:967px" %)Gbk text, the first byte is the string length
615 +|(% style="width:203px" %)12|(% style="width:967px" %)Unicode text
611 611  
612 -
613 613  * element6:element
614 614  
619 +|=(% style="width: 203px;" %)Value|=(% style="width: 967px;" %)Describe
620 +|(% style="width:203px" %)0|(% style="width:967px" %)Default
621 +|(% style="width:203px" %)11|(% style="width:967px" %)Characters are stored in one word
615 615  
616 -
617 617  Return:
618 618  
619 619  * Success: the designated length of the string
... ... @@ -622,12 +622,12 @@
622 622  Example:
623 623  
624 624  {{code language="Lua"}}
625 -print(we_bas_getstring("@W_HDW0", 10))
631 +print(we_bas_getstring("@W_HDW0", 10,0,0,0,0))
626 626  {{/code}}
627 627  
628 628  == [[we_bas_setstring>>||anchor="HAddressclass"]] ==
629 629  
630 -Prototype: we_bas_setstring(address, str [, len])
636 +Prototype: we_bas_setstring(address, str [, len, type, element4, element5, element6])
631 631  
632 632  Function: Write string
633 633  
... ... @@ -636,7 +636,25 @@
636 636  * address(string):address
637 637  * str(string):string
638 638  * len(number):length, if not set, it will be the bytes of the string
645 +* element4:element
639 639  
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 +
663 +
640 640  Return:
641 641  
642 642  * Success: true