From 3e6ff8f257422c7b9deb295bbf5b508245095363 Mon Sep 17 00:00:00 2001 From: Divay Prakash Date: Sat, 27 Oct 2018 16:17:59 +0530 Subject: More fixes --- smalltalk.html.markdown | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'smalltalk.html.markdown') diff --git a/smalltalk.html.markdown b/smalltalk.html.markdown index 57e558b2..d9edbf06 100644 --- a/smalltalk.html.markdown +++ b/smalltalk.html.markdown @@ -188,7 +188,7 @@ x := Random new next; yourself. x next. "random number strea x := 100 atRandom. "quick random number" ``` -##Bitwise Manipulation: +## Bitwise Manipulation: ``` | b x | x := 16rFF bitAnd: 16r0F. "and bits" @@ -381,7 +381,9 @@ y := x asSet. "convert string to s y := x shuffled. "randomly shuffle string" ``` -## Array: Fixed length collection +## Array: +Fixed length collection + - ByteArray: Array limited to byte elements (0-255) - WordArray: Array limited to word elements (0-2^32) @@ -424,7 +426,9 @@ y := x asBag. "convert to bag coll y := x asSet. "convert to set collection" ``` -## OrderedCollection: acts like an expandable array +## OrderedCollection: +acts like an expandable array + ``` | b x y sum max | x := OrderedCollection with: 4 with: 3 with: 2 with: 1. "create collection with up to 4 elements" @@ -616,7 +620,6 @@ y := x key. y := x value. ``` -## Dictionary: ## IdentityDictionary: uses identity test (== rather than =) -- cgit v1.2.3