Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /tests/trunk/bugs/tests.obsolete/bug1036.sml
ViewVC logotype

View of /tests/trunk/bugs/tests.obsolete/bug1036.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2460 - (download) (annotate)
Sat Apr 28 20:18:10 2007 UTC (12 years, 1 month ago) by gkuan
File size: 327 byte(s)
(* bug1036.sml *)

val a = CharArray.fromList(explode "abcdefgh");
val v = CharArray.extract(a, 0, SOME 4);

(* note the garbage bytes after the "abcd" prefix *)

size v;

(* asked for 4 bytes, got 8 *)

val a = Word8Array.array(8, 0w65);
val v = Word8Array.extract(a, 0, SOME 4);
Word8Vector.length v;
(Unsafe.cast v):string;

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0