From 8d78c7c6384da8b0bade19f782509db94c4ca792 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Tue, 22 Apr 2025 09:54:23 -0700 Subject: More help for block layout --- chapter22/README.md | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) (limited to 'chapter22') diff --git a/chapter22/README.md b/chapter22/README.md index 63cd12bf..570490f8 100644 --- a/chapter22/README.md +++ b/chapter22/README.md @@ -1,4 +1,4 @@ -# Chapter 22: Strings and Such +# Chapter 22: Strings and I/O It's high time for Strings and printing! In this chapter we look at what it takes to make a nice user-mode string. We are implementing strings in the base @@ -46,11 +46,11 @@ Any number of named fields are allowed: ```java struct Class { - str className; - str professor; - int time; - int credits; - Class prerequisiste; + str className; + str professor; + int time; + int credits; + Class prerequisite; u16 #; // Limit of 65535 students per class Student []; }; @@ -135,4 +135,24 @@ chapter. ## A String Implementation +### A Final String + +### A Extendable String (aka StringBuilder or StringBuffer) + +```java +struct xstr { +// update-in-place expanding string + +}; +``` + + ## FFI and I/O Calls + +Calling external / FFI functions. + +`{ i32 fd, u8[] buf, i32 len -> i32 } write = "C";` + + +## Importing name spaces + -- cgit v1.2.3