]> gitweb.factorcode.org Git - factor.git/commitdiff
Use easy-help in 'size-of'
authorEduardo Cavazos <dharmatech@finkelstein.stackeffects.info>
Mon, 22 Dec 2008 21:50:14 +0000 (15:50 -0600)
committerEduardo Cavazos <dharmatech@finkelstein.stackeffects.info>
Mon, 22 Dec 2008 21:50:14 +0000 (15:50 -0600)
extra/size-of/size-of.factor

index d40ea6f8bad79e908345968e5f57c6cca65a3bd1..06a7067636be907d83b1b247a733fb11526ab119 100644 (file)
@@ -1,19 +1,39 @@
 
 USING: io io.encodings.ascii io.files io.files.temp io.launcher
-       locals math.parser sequences sequences.deep ;
+       locals math.parser sequences sequences.deep
+       help.syntax
+       easy-help ;
 
 IN: size-of
 
-! Use 'size-of' to find out the size in bytes of a C type.
-!
-! The 'headers' argument is a list of header files to use. You may
-! pass 'f' to only use 'stdio.h'.
-!
-! Examples:
-! 
-!   f "int" size-of .
-! 
-!   { "X11/Xlib.h" } "XAnyEvent" size-of .
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+DEFER: size-of
+
+HELP: size-of
+
+Description:
+
+    Use 'size-of' to find out the size in bytes of a C type. 
+
+    The 'headers' argument is a list of header files to use. You may 
+    pass 'f' to only use 'stdio.h'. ..
+
+Example:
+
+    ! Find the size of 'int'
+
+    f "int" size-of .    ..
+
+Example:
+
+    ! Find the size of the 'XAnyEvent' struct from Xlib.h
+
+    { "X11/Xlib.h" } "XAnyEvent" size-of .    ..
+
+;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
 :: size-of ( HEADERS TYPE -- n )