Int8.From แปลงค่าต่างๆ เป็นประเภท Int8 (8-bit integer) ที่มีช่วง -128 ถึง 127 ใช้สำหรับข้อมูลขนาดเล็กมากหรือเมื่อต้องการประหยัด memory สูงสุด
=int8.from(value as any) as any
=int8.from(value as any) as any
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
| value | any | Yes | ค่าหรือรายการที่ต้องการประมวลผล |
int8.from({1, 2, 3})=int8.from({1, 2, 3})
ผลลัพธ์
int8.from(SourceData)=int8.from(SourceData)
ผลลัพธ์จากข้อมูล
let Data = {...}, Result = int8.from(Data) in Resultlet Data = {...}, Result = int8.from(Data) in Result
ผลลัพธ์สุดท้าย
ใช้สำหรับ: ข้อมูลขนาดเล็กมากหรือเมื่อต้องการประหยัด memory สูงสุด
ได้ ฟังก์ชันนี้ยืดหยุ่นและสามารถใช้กับประเภทข้อมูลต่างๆ
แปลงค่าเป็น 8-bit integer