September Morn Update

This commit is contained in:
Ingy döt Net 2019-09-12 10:33:56 -07:00
parent 4e2d22a71d
commit aac6731f2c
6856 changed files with 141342 additions and 21127 deletions

View file

@ -1 +1 @@
i := sizeof([any variable or structure]);
i := sizeof({any variable or data type identifier});

View file

@ -0,0 +1,2 @@
: .CELLSIZE ( -- ) CR 1 CELLS . ." Bytes" ;
VARIABLE X ( creates a variable 1 cell wide)

View file

@ -0,0 +1,4 @@
.CELLSIZE
4 Bytes ok
-1 X ! ok
HEX X @ U. FFFFFFFF ok

View file

@ -0,0 +1,10 @@
use std::mem;
fn main() {
// Specify type
assert_eq!(4, mem::size_of::<i32>());
// Provide a value
let arr: [u16; 3] = [1, 2, 3];
assert_eq!(6, mem::size_of_val(&arr));
}