cvsuser 04/01/31 08:09:21
Modified: examples/assembly mops.pasm
examples/benchmarks primes.c primes2.c
examples/mops mops.c mops.cs mops.p6 mops.pl mops.py mops.rb
examples/pni PQt.C QtHelloWorld.pasm win32api.imc
examples/subs sub1.imc sub2.imc sub3.imc
Log:
Docs Update
Revision Changes Path
1.7 +11 -2 parrot/examples/assembly/mops.pasm
Index: mops.pasm
===================================================================
RCS file: /cvs/public/parrot/examples/assembly/mops.pasm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -r1.6 -r1.7
--- mops.pasm 30 Jan 2004 11:25:04 -0000 1.6
+++ mops.pasm 31 Jan 2004 16:09:07 -0000 1.7
@@ -1,5 +1,5 @@
# Copyright (C) 2001-2003 The Perl Foundation. All rights reserved.
-# $Id: mops.pasm,v 1.6 2004/01/30 11:25:04 mikescott Exp $
+# $Id: mops.pasm,v 1.7 2004/01/31 16:09:07 mikescott Exp $
=head1 NAME
@@ -62,7 +62,16 @@
=head1 SEE ALSO
-F<examples/assembly/mops_p.pasm>.
+F<examples/assembly/mops_p.pasm>,
+F<examples/mops/mops.c>,
+F<examples/mops/mops.cs>,
+F<examples/mops/mops.il>,
+F<examples/mops/mops.p6>,
+F<examples/mops/mops.pl>,
+F<examples/mops/mops.ps>,
+F<examples/mops/mops.py>,
+F<examples/mops/mops.rb>,
+F<examples/mops/mops.scheme>.
=cut
1.3 +7 -5 parrot/examples/benchmarks/primes.c
Index: primes.c
===================================================================
RCS file: /cvs/public/parrot/examples/benchmarks/primes.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- primes.c 31 Jan 2004 13:16:08 -0000 1.2
+++ primes.c 31 Jan 2004 16:09:11 -0000 1.3
@@ -1,6 +1,6 @@
/*
Copyright (C) 2001-2003 The Perl Foundation. All rights reserved.
-$Id: primes.c,v 1.2 2004/01/31 13:16:08 mikescott Exp $
+$Id: primes.c,v 1.3 2004/01/31 16:09:11 mikescott Exp $
=head1 NAME
@@ -8,8 +8,8 @@
=head1 SYNOPSIS
- % cc examples/benchmarks/primes.c -o primes
- % time ./primes
+ % make examples/benchmarks/primes
+ % time examples/benchmarks/primes
=head1 DESCRIPTION
@@ -22,8 +22,8 @@
#include <stdio.h>
-
-int main()
+int
+main(int argc, char *argv[])
{
int I1 = 1;
int I2 = 50000;
@@ -53,6 +53,8 @@
if (I1 <= I2) {goto REDO;}
printf("%d\n", I6);
printf("last is: %d\n", I7);
+
+ return 0;
}
/*
1.3 +7 -4 parrot/examples/benchmarks/primes2.c
Index: primes2.c
===================================================================
RCS file: /cvs/public/parrot/examples/benchmarks/primes2.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- primes2.c 31 Jan 2004 13:16:08 -0000 1.2
+++ primes2.c 31 Jan 2004 16:09:11 -0000 1.3
@@ -1,6 +1,6 @@
/*
Copyright (C) 2001-2003 The Perl Foundation. All rights reserved.
-$Id: primes2.c,v 1.2 2004/01/31 13:16:08 mikescott Exp $
+$Id: primes2.c,v 1.3 2004/01/31 16:09:11 mikescott Exp $
=head1 NAME
@@ -8,8 +8,8 @@
=head1 SYNOPSIS
- % cc examples/benchmarks/primes2.c -o primes2
- % time ./primes2
+ % make examples/benchmarks/primes2
+ % time examples/benchmarks/primes2
=head1 DESCRIPTION
@@ -20,7 +20,9 @@
*/
-int main(){
+int
+main(int argc, char *argv[])
+{
int i=0, max=10000;
int i6 = 0;
int i7;
@@ -38,6 +40,7 @@
printf("N primes calculated to %d is %d\nlast is: %d\n",max,i6,i7);
+ return 0;
}
int isprime1(int input)
1.7 +53 -10 parrot/examples/mops/mops.c
Index: mops.c
===================================================================
RCS file: /cvs/public/parrot/examples/mops/mops.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -r1.6 -r1.7
--- mops.c 30 Mar 2002 19:02:22 -0000 1.6
+++ mops.c 31 Jan 2004 16:09:13 -0000 1.7
@@ -1,14 +1,40 @@
/*
-** cmops.c
-**
-** A pure C implementation of the mops.pasm example program,
-** for speed comparisons.
-**
-** Copyright (C) 2001 The Parrot Team. All rights reserved.
-** This program is free software. It is subject to the same
-** license as The Parrot Interpreter.
-**
-** $Id: mops.c,v 1.6 2002/03/30 19:02:22 sfink Exp $
+Copyright (C) 2001-2003 The Perl Foundation. All rights reserved.
+$Id: mops.c,v 1.7 2004/01/31 16:09:13 mikescott Exp $
+
+=head1 NAME
+
+examples/mops/mops.c - Calculate M ops/s
+
+=head1 SYNOPSIS
+
+ % make examples/mops/mops
+ % time examples/mops/mops
+
+=head1 DESCRIPTION
+
+A pure C implementation of the F<examples/mops/mops.pasm> example
+program, for speed comparisons.
+
+Calculates a value for M ops/s (million operations per second) using
+integer arithmetic.
+
+Prints out:
+
+=over 4
+
+=item * the number of look iterations,
+
+=item * the estimated number of ops performed,
+
+=item * the elapsed time, and
+
+=item * the number of M op/s.
+
+=back
+
+=cut
+
*/
#include <parrot/parrot.h>
@@ -70,6 +96,23 @@
return 0; /* end */
}
+/*
+
+=head1 SEE ALSO
+
+F<examples/assembly/mops.pasm>,
+F<examples/mops/mops.cs>,
+F<examples/mops/mops.il>,
+F<examples/mops/mops.p6>,
+F<examples/mops/mops.pl>,
+F<examples/mops/mops.ps>,
+F<examples/mops/mops.py>,
+F<examples/mops/mops.rb>,
+F<examples/mops/mops.scheme>.
+
+=cut
+
+*/
/*
* Local variables:
1.4 +56 -0 parrot/examples/mops/mops.cs
Index: mops.cs
===================================================================
RCS file: /cvs/public/parrot/examples/mops/mops.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -r1.3 -r1.4
--- mops.cs 26 Jul 2002 01:44:57 -0000 1.3
+++ mops.cs 31 Jan 2004 16:09:13 -0000 1.4
@@ -1,3 +1,41 @@
+/*
+Copyright (C) 2001-2003 The Perl Foundation. All rights reserved.
+$Id: mops.cs,v 1.4 2004/01/31 16:09:13 mikescott Exp $
+
+=head1 NAME
+
+examples/mops/mops.c - Calculate M ops/s
+
+=head1 SYNOPSIS
+
+I<Anyone know how to run this?>
+
+=head1 DESCRIPTION
+
+A C# implementation of the F<examples/mops/mops.pasm> example
+program, for speed comparisons.
+
+Calculates a value for M ops/s (million operations per second) using
+integer arithmetic.
+
+Prints out:
+
+=over 4
+
+=item * the number of look iterations,
+
+=item * the estimated number of ops performed,
+
+=item * the elapsed time, and
+
+=item * the number of M op/s.
+
+=back
+
+=cut
+
+*/
+
// created on 03/03/2002 at 15:12
using System;
@@ -41,3 +79,21 @@
return 0;
}
}
+
+/*
+
+=head1 SEE ALSO
+
+F<examples/assembly/mops.pasm>,
+F<examples/mops/mops.c>,
+F<examples/mops/mops.il>,
+F<examples/mops/mops.p6>,
+F<examples/mops/mops.pl>,
+F<examples/mops/mops.ps>,
+F<examples/mops/mops.py>,
+F<examples/mops/mops.rb>,
+F<examples/mops/mops.scheme>.
+
+=cut
+
+*/
1.3 +48 -10 parrot/examples/mops/mops.p6
Index: mops.p6
===================================================================
RCS file: /cvs/public/parrot/examples/mops/mops.p6,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- mops.p6 21 Aug 2002 06:09:56 -0000 1.2
+++ mops.p6 31 Jan 2004 16:09:13 -0000 1.3
@@ -1,13 +1,38 @@
-#
-# mops.p6
-#
-# A Perl 6 implementation of the mops.pasm example program,
-# for speed comparisons.
-#
-# Copyright (C) 2002 The Parrot Team. All rights reserved.
-# This program is free software. It is subject to the same
-# license as The Parrot Interpreter.
-#
+# Copyright (C) 2001-2003 The Perl Foundation. All rights reserved.
+# $Id: mops.p6,v 1.3 2004/01/31 16:09:13 mikescott Exp $
+
+=head1 NAME
+
+examples/mops/mops.c - Calculate M ops/s
+
+=head1 SYNOPSIS
+
+ % make examples/mops/mops
+ % time examples/mops/mops
+
+=head1 DESCRIPTION
+
+A Perl 6 implementation of the F<examples/mops/mops.pasm> example
+program, for speed comparisons.
+
+Calculates a value for M ops/s (million operations per second) using
+integer arithmetic.
+
+Prints out:
+
+=over 4
+
+=item * the number of look iterations,
+
+=item * the estimated number of ops performed,
+
+=item * the elapsed time, and
+
+=item * the number of M op/s.
+
+=back
+
+=cut
sub main() {
my ($I1, $I2, $I3, $I4, $I5, $N1, $N2, $N4, $N5);
@@ -50,3 +75,16 @@
#
} # end main
+=head1 SEE ALSO
+
+F<examples/assembly/mops.pasm>,
+F<examples/mops/mops.c>,
+F<examples/mops/mops.cs>,
+F<examples/mops/mops.il>,
+F<examples/mops/mops.pl>,
+F<examples/mops/mops.ps>,
+F<examples/mops/mops.py>,
+F<examples/mops/mops.rb>,
+F<examples/mops/mops.scheme>.
+
+=cut
1.2 +48 -13 parrot/examples/mops/mops.pl
Index: mops.pl
===================================================================
RCS file: /cvs/public/parrot/examples/mops/mops.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- mops.pl 27 Dec 2001 23:56:21 -0000 1.1
+++ mops.pl 31 Jan 2004 16:09:13 -0000 1.2
@@ -1,16 +1,38 @@
-#!/usr/bin/perl
-#
-# mops.pl
-#
-# A Perl implementation of the mops.pasm example program,
-# for speed comparisons.
-#
-# Copyright (C) 2001 The Parrot Team. All rights reserved.
-# This program is free software. It is subject to the same
-# license as The Parrot Interpreter.
-#
-# $Id: mops.pl,v 1.1 2001/12/27 23:56:21 gregor Exp $
-#
+#! perl -w
+# Copyright (C) 2001-2003 The Perl Foundation. All rights reserved.
+# $Id: mops.pl,v 1.2 2004/01/31 16:09:13 mikescott Exp $
+
+=head1 NAME
+
+examples/mops/mops.c - Calculate M ops/s
+
+=head1 SYNOPSIS
+
+ % perl examples/mops/mops.pl
+
+=head1 DESCRIPTION
+
+A Perl implementation of the F<examples/mops/mops.pasm> example program,
+for speed comparisons.
+
+Calculates a value for M ops/s (million operations per second) using
+integer arithmetic.
+
+Prints out:
+
+=over 4
+
+=item * the number of look iterations,
+
+=item * the estimated number of ops performed,
+
+=item * the elapsed time, and
+
+=item * the number of M op/s.
+
+=back
+
+=cut
sub time_hires { time() }
@@ -55,3 +77,16 @@
#
exit(0); # end
+=head1 SEE ALSO
+
+F<examples/assembly/mops.pasm>,
+F<examples/mops/mops.c>,
+F<examples/mops/mops.cs>,
+F<examples/mops/mops.il>,
+F<examples/mops/mops.p6>,
+F<examples/mops/mops.ps>,
+F<examples/mops/mops.py>,
+F<examples/mops/mops.rb>,
+F<examples/mops/mops.scheme>.
+
+=cut
1.3 +54 -20 parrot/examples/mops/mops.py
Index: mops.py
===================================================================
RCS file: /cvs/public/parrot/examples/mops/mops.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- mops.py 13 Dec 2002 21:39:58 -0000 1.2
+++ mops.py 31 Jan 2004 16:09:13 -0000 1.3
@@ -1,23 +1,40 @@
-#!/usr/bin/perl
-#
-# mops.py
-#
-# Example command line:
-#
-# python mops.py
-#
-# NOTE: 10,000,000 iterations used instead of 100,000,000
-# to keep things from bogging down too much.
-#
-# A Python implementation of the mops.pasm example program,
-# for speed comparisons.
-#
-# Copyright (C) 2001 The Parrot Team. All rights reserved.
-# This program is free software. It is subject to the same
-# license as The Parrot Interpreter.
-#
-# $Id: mops.py,v 1.2 2002/12/13 21:39:58 gregor Exp $
-#
+"""
+# Copyright (C) 2001-2003 The Perl Foundation. All rights reserved.
+# $Id: mops.py,v 1.3 2004/01/31 16:09:13 mikescott Exp $
+
+=head1 NAME
+
+examples/mops/mops.c - Calculate M ops/s
+
+=head1 SYNOPSIS
+
+ % python examples/mops/mops.py
+
+=head1 DESCRIPTION
+
+A Python implementation of the F<examples/mops/mops.pasm> example
+program, for speed comparisons.
+
+Calculates a value for M ops/s (million operations per second) using
+integer arithmetic.
+
+Prints out:
+
+=over 4
+
+=item * the number of look iterations,
+
+=item * the estimated number of ops performed,
+
+=item * the elapsed time, and
+
+=item * the number of M op/s.
+
+=back
+
+=cut
+
+"""
import sys
import time
@@ -63,3 +80,20 @@
#
sys.exit(0) # end
+"""
+
+=head1 SEE ALSO
+
+F<examples/assembly/mops.pasm>,
+F<examples/mops/mops.c>,
+F<examples/mops/mops.cs>,
+F<examples/mops/mops.il>,
+F<examples/mops/mops.p6>,
+F<examples/mops/mops.pl>,
+F<examples/mops/mops.ps>,
+F<examples/mops/mops.rb>,
+F<examples/mops/mops.scheme>.
+
+=cut
+
+"""
\ No newline at end of file
1.3 +57 -20 parrot/examples/mops/mops.rb
Index: mops.rb
===================================================================
RCS file: /cvs/public/parrot/examples/mops/mops.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- mops.rb 13 Dec 2002 21:39:58 -0000 1.2
+++ mops.rb 31 Jan 2004 16:09:13 -0000 1.3
@@ -1,23 +1,43 @@
-#!/usr/bin/ruby
-#
-# mops.rb
-#
-# Example command line:
-#
-# ruby mops.rb
-#
-# NOTE: 10,000,000 iterations used instead of 100,000,000
-# to keep things from bogging down too much.
-#
-# A Ruby implementation of the mops.pasm example program,
-# for speed comparisons.
-#
-# Copyright (C) 2001 The Parrot Team. All rights reserved.
-# This program is free software. It is subject to the same
-# license as The Parrot Interpreter.
-#
-# $Id: mops.rb,v 1.2 2002/12/13 21:39:58 gregor Exp $
-#
+#! ruby
+
+=begin RUBY_COMMENT
+
+Copyright (C) 2001-2003 The Perl Foundation. All rights reserved.
+$Id: mops.rb,v 1.3 2004/01/31 16:09:13 mikescott Exp $
+
+=head1 NAME
+
+examples/mops/mops.c - Calculate M ops/s
+
+=head1 SYNOPSIS
+
+ % ruby examples/mops/mops.rb
+
+=head1 DESCRIPTION
+
+A Ruby implementation of the F<examples/mops/mops.pasm> example program,
+for speed comparisons.
+
+Calculates a value for M ops/s (million operations per second) using
+integer arithmetic.
+
+Prints out:
+
+=over 4
+
+=item * the number of look iterations,
+
+=item * the estimated number of ops performed,
+
+=item * the elapsed time, and
+
+=item * the number of M op/s.
+
+=back
+
+=cut
+
+=end RUBY_COMMENT
i2 = 0 # set I2, 0
i3 = 1 # set I3, 1
@@ -60,3 +80,20 @@
#
exit(0) # end
+=begin RUBY_COMMENT
+
+=head1 SEE ALSO
+
+F<examples/assembly/mops.pasm>,
+F<examples/mops/mops.c>,
+F<examples/mops/mops.cs>,
+F<examples/mops/mops.il>,
+F<examples/mops/mops.p6>,
+F<examples/mops/mops.pl>,
+F<examples/mops/mops.ps>,
+F<examples/mops/mops.py>,
+F<examples/mops/mops.scheme>.
+
+=cut
+
+=end RUBY_COMMENT
\ No newline at end of file
1.2 +90 -15 parrot/examples/pni/PQt.C
Index: PQt.C
===================================================================
RCS file: /cvs/public/parrot/examples/pni/PQt.C,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- PQt.C 12 Oct 2003 04:44:04 -0000 1.1
+++ PQt.C 31 Jan 2004 16:09:17 -0000 1.2
@@ -1,13 +1,30 @@
/*
- * Qt Native interface for Parrot - Sample for playing with the
- * extension design.
- *
- * compile with: g++ -fPIC -I$QTDIR/include -L$QTDIR -c PQt.C
- * gcc -shared -o libPQt.so PQt.o $QTDIR/lib/libqt.so
- *
- * Or something like that...
- */
+# Copyright (C) 2001-2003 The Perl Foundation. All rights reserved.
+# $Id: PQt.C,v 1.2 2004/01/31 16:09:17 mikescott Exp $
+
+=head1 NAME
+
+examples/pni/PQt.C - Qt/Parrot Library
+
+=head1 SYNOPSIS
+
+Compile with:
+
+ g++ -fPIC -I$QTDIR/include -L$QTDIR -c PQt.C
+
+ gcc -shared -o libPQt.so PQt.o $QTDIR/lib/libqt.so
+
+Or something like that...
+
+=head1 DESCRIPTION
+
+Qt Native interface for Parrot. See F<examples/pni/QtHelloWorld.pasm>
+for more information.
+
+=cut
+
+*/
#include <qapplication.h>
#include <qlabel.h>
@@ -17,9 +34,16 @@
QApplication * pApp;
-
/*
- * QApplication bindings
+
+=head2 QApplication bindings
+
+=over 4
+
+=item C<QApplication *QApplication_new(void)>
+
+=cut
+
*/
QApplication *QApplication_new(void) {
int PQtargc = 0;
@@ -30,19 +54,44 @@
return pApp;
}
+/*
+
+=item C<void QApplication_exec(QApplication *app)>
+
+=cut
+
+*/
+
void QApplication_exec(QApplication *app)
{
app->exec();
}
+/*
+
+=item C<void QApplication_setMainWidget(QApplication *app, QWidget *w)>
+
+=cut
+
+*/
+
void QApplication_setMainWidget(QApplication *app, QWidget *w)
{
app->setMainWidget(w);
}
-
/*
- * QLabel bindings
+
+=back
+
+=head2 QLabel bindings
+
+=over 4
+
+=item C<QLabel * QLabel_new(const char *txt)>
+
+=cut
+
*/
QLabel * QLabel_new(const char *txt)
@@ -51,17 +100,43 @@
return pLabel;
}
+/*
+
+=item C<void QLabel_show(QLabel *label)>
+
+=cut
+
+*/
+
void QLabel_show(QLabel *label)
{
label->show();
}
+/*
+
+=item C<void QLabel_resize(QLabel *label, int x, int y)>
+
+=cut
+
+*/
+
void QLabel_resize(QLabel *label, int x, int y)
{
label->resize(x, y);
}
+}
+
+/*
+=back
-}
+=head1 SEE ALSO
+F<examples/pni/QtHelloWorld.pasm>,
+F<docs/pdds/pdd03_calling_conventions.pod>.
+
+=cut
+
+*/
\ No newline at end of file
1.3 +31 -13 parrot/examples/pni/QtHelloWorld.pasm
Index: QtHelloWorld.pasm
===================================================================
RCS file: /cvs/public/parrot/examples/pni/QtHelloWorld.pasm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- QtHelloWorld.pasm 19 Nov 2003 10:16:58 -0000 1.2
+++ QtHelloWorld.pasm 31 Jan 2004 16:09:17 -0000 1.3
@@ -1,17 +1,29 @@
-# Sample "Hello World" with Qt, via Parrot Native Call API (nci)
-# s. docs/pdds/pdd03_calling_conventions.pod
-#
-# You'll need to build libPQt.so for this to work, see
-# PQt.C for more info.
-# Please note: this will either need JIT/i386 for building the
-# nci-functions on the fly, or adding missing
-# signatures to call_list.txt and rebuilding parrot/imcc
-#
-# make
-# cd examples/pni
-# export LD_LIBRARY_PATH=.
-# ../../parrot QtHelloWorld.pasm
+# Copyright (C) 2001-2003 The Perl Foundation. All rights reserved.
+# $Id: QtHelloWorld.pasm,v 1.3 2004/01/31 16:09:17 mikescott Exp $
+=head1 NAME
+
+examples/pni/QtHelloWorld.pasm - Qt Example
+
+=head1 SYNOPSIS
+
+ % ./parrot examples/pni/QtHelloWorld.pasm
+
+=head1 DESCRIPTION
+
+Sample "Hello World" with Qt, via Parrot Native Call API (nci). See
+F<docs/pdds/pdd03_calling_conventions.pod>.
+
+Qt is a multiplatform C++ GUI application framework
+(Lhttp://doc.trolltech.com/3.1/aboutqt.html>). You'll need to build
+F<libPQt.so> and install it in F<runtime/parrot/dynext> for this to
+work, see F<examples/pni/PQt.C> for more information.
+
+Note that this will either need JIT for building the NCI-functions on
+the fly. If this is not available try adding missing signatures to
+F<src/call_list.txt> and rebuilding Parrot.
+
+=cut
# load the shared lib
loadlib P1, "libPQt"
@@ -49,3 +61,9 @@
set P5, P2 # app
invoke
end
+
+=head1 SEE ALSO
+
+F<examples/pni/PQt.C>, F<docs/pdds/pdd03_calling_conventions.pod>.
+
+=cut
1.3 +30 -9 parrot/examples/pni/win32api.imc
Index: win32api.imc
===================================================================
RCS file: /cvs/public/parrot/examples/pni/win32api.imc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- win32api.imc 12 Jan 2004 09:18:19 -0000 1.2
+++ win32api.imc 31 Jan 2004 16:09:17 -0000 1.3
@@ -1,12 +1,27 @@
-# This example calls the MessageBoxA Win32 API using the Parrot Native
-# Call Interface. The function is defined as:-
-#
-# int MessageBox(
-# HWND hWnd,
-# LPCTSTR lpText,
-# LPCTSTR lpCaption,
-# UINT uType
-# );
+# Copyright (C) 2001-2003 The Perl Foundation. All rights reserved.
+# $Id: win32api.imc,v 1.3 2004/01/31 16:09:17 mikescott Exp $
+
+=head1 NAME
+
+examples/pni/win32api.imc - Win32 Example
+
+=head1 SYNOPSIS
+
+ % ./parrot examples/pni/win32api.imc
+
+=head1 DESCRIPTION
+
+This example calls the MessageBoxA Win32 API using the Parrot Native
+Call Interface. The function is defined as:-
+
+ int MessageBox(
+ HWND hWnd,
+ LPCTSTR lpText,
+ LPCTSTR lpCaption,
+ UINT uType
+ );
+
+=cut
# This is the entry point.
.sub _MAIN
@@ -40,3 +55,9 @@
# That's all, folks.
end
.end
+
+=head1 SEE ALSO
+
+F<docs/pdds/pdd03_calling_conventions.pod>.
+
+=cut
1.2 +24 -1 parrot/examples/subs/sub1.imc
Index: sub1.imc
===================================================================
RCS file: /cvs/public/parrot/examples/subs/sub1.imc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- sub1.imc 17 Nov 2003 02:25:08 -0000 1.1
+++ sub1.imc 31 Jan 2004 16:09:21 -0000 1.2
@@ -1,4 +1,20 @@
-# Simple sub calls with 1 return value
+# Copyright (C) 2001-2003 The Perl Foundation. All rights reserved.
+# $Id: sub1.imc,v 1.2 2004/01/31 16:09:21 mikescott Exp $
+
+=head1 NAME
+
+examples/subs/sub1.imc - Subroutine Example
+
+=head1 SYNOPSIS
+
+ % ./parrot examples/subs/sub1.imc
+
+=head1 DESCRIPTION
+
+Simple sub calls with 1 return value.
+
+=cut
+
.sub _main
.local int i
.local int j
@@ -27,3 +43,10 @@
.return 10
.pcc_end_return
.end
+
+=head2 SEE ALSO
+
+F<examples/subs/sub2.imc>,
+F<examples/subs/sub3.imc>.
+
+=cut
1.2 +24 -1 parrot/examples/subs/sub2.imc
Index: sub2.imc
===================================================================
RCS file: /cvs/public/parrot/examples/subs/sub2.imc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- sub2.imc 17 Nov 2003 02:25:08 -0000 1.1
+++ sub2.imc 31 Jan 2004 16:09:21 -0000 1.2
@@ -1,4 +1,20 @@
-# Call a sub with multiple return values
+# Copyright (C) 2001-2003 The Perl Foundation. All rights reserved.
+# $Id: sub2.imc,v 1.2 2004/01/31 16:09:21 mikescott Exp $
+
+=head1 NAME
+
+examples/subs/sub2.imc - Subroutine Example
+
+=head1 SYNOPSIS
+
+ % ./parrot examples/subs/sub2.imc
+
+=head1 DESCRIPTION
+
+Call a sub with multiple return values.
+
+=cut
+
.sub _main
(I0, I1, $I99) = _foo(7, 8, "nine")
print "return: "
@@ -18,3 +34,10 @@
.return 12
.pcc_end_return
.end
+
+=head2 SEE ALSO
+
+F<examples/subs/sub1.imc>,
+F<examples/subs/sub3.imc>.
+
+=cut
1.2 +24 -1 parrot/examples/subs/sub3.imc
Index: sub3.imc
===================================================================
RCS file: /cvs/public/parrot/examples/subs/sub3.imc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- sub3.imc 17 Nov 2003 02:25:08 -0000 1.1
+++ sub3.imc 31 Jan 2004 16:09:21 -0000 1.2
@@ -1,4 +1,20 @@
-# Call a sub with no return values
+# Copyright (C) 2001-2003 The Perl Foundation. All rights reserved.
+# $Id: sub3.imc,v 1.2 2004/01/31 16:09:21 mikescott Exp $
+
+=head1 NAME
+
+examples/subs/sub3.imc - Subroutine Example
+
+=head1 SYNOPSIS
+
+ % ./parrot examples/subs/sub3.imc
+
+=head1 DESCRIPTION
+
+Call a sub with no return values.
+
+=cut
+
.sub _main
_foo(7, 8, "nine")
end
@@ -17,3 +33,10 @@
.pcc_begin_return # This syntax is going away soon
.pcc_end_return
.end
+
+=head2 SEE ALSO
+
+F<examples/subs/sub1.imc>,
+F<examples/subs/sub2.imc>.
+
+=cut