\documentclass[12pt,titlepage]{article} \usepackage{amsmath} \usepackage{mathrsfs} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsthm} \usepackage{mathtools} \usepackage{graphicx} \usepackage{color} \usepackage{ucs} \usepackage[utf8x]{inputenc} \usepackage{xparse} \usepackage{tikz} \usepackage{hyperref} %----Macros---------- % % Unresolved issues: % % \righttoleftarrow % \lefttorightarrow % % \color{} with HTML colorspec % \bgcolor % \array with options (without options, it's equivalent to the matrix environment) % Of the standard HTML named colors, white, black, red, green, blue and yellow % are predefined in the color package. Here are the rest. \definecolor{aqua}{rgb}{0, 1.0, 1.0} \definecolor{fuschia}{rgb}{1.0, 0, 1.0} \definecolor{gray}{rgb}{0.502, 0.502, 0.502} \definecolor{lime}{rgb}{0, 1.0, 0} \definecolor{maroon}{rgb}{0.502, 0, 0} \definecolor{navy}{rgb}{0, 0, 0.502} \definecolor{olive}{rgb}{0.502, 0.502, 0} \definecolor{purple}{rgb}{0.502, 0, 0.502} \definecolor{silver}{rgb}{0.753, 0.753, 0.753} \definecolor{teal}{rgb}{0, 0.502, 0.502} % Because of conflicts, \space and \mathop are converted to % \itexspace and \operatorname during preprocessing. % itex: \space{ht}{dp}{wd} % % Height and baseline depth measurements are in units of tenths of an ex while % the width is measured in tenths of an em. \makeatletter \newdimen\itex@wd% \newdimen\itex@dp% \newdimen\itex@thd% \def\itexspace#1#2#3{\itex@wd=#3em% \itex@wd=0.1\itex@wd% \itex@dp=#2ex% \itex@dp=0.1\itex@dp% \itex@thd=#1ex% \itex@thd=0.1\itex@thd% \advance\itex@thd\the\itex@dp% \makebox[\the\itex@wd]{\rule[-\the\itex@dp]{0cm}{\the\itex@thd}}} \makeatother % \tensor and \multiscript \makeatletter \newif\if@sup \newtoks\@sups \def\append@sup#1{\edef\act{\noexpand\@sups={\the\@sups #1}}\act}% \def\reset@sup{\@supfalse\@sups={}}% \def\mk@scripts#1#2{\if #2/ \if@sup ^{\the\@sups}\fi \else% \ifx #1_ \if@sup ^{\the\@sups}\reset@sup \fi {}_{#2}% \else \append@sup#2 \@suptrue \fi% \expandafter\mk@scripts\fi} \def\tensor#1#2{\reset@sup#1\mk@scripts#2_/} \def\multiscripts#1#2#3{\reset@sup{}\mk@scripts#1_/#2% \reset@sup\mk@scripts#3_/} \makeatother % \slash \makeatletter \newbox\slashbox \setbox\slashbox=\hbox{$/$} \def\itex@pslash#1{\setbox\@tempboxa=\hbox{$#1$} \@tempdima=0.5\wd\slashbox \advance\@tempdima 0.5\wd\@tempboxa \copy\slashbox \kern-\@tempdima \box\@tempboxa} \def\slash{\protect\itex@pslash} \makeatother % math-mode versions of \rlap, etc % from Alexander Perlis, "A complement to \smash, \llap, and lap" % http://math.arizona.edu/~aprl/publications/mathclap/ \def\clap#1{\hbox to 0pt{\hss#1\hss}} \def\mathllap{\mathpalette\mathllapinternal} \def\mathrlap{\mathpalette\mathrlapinternal} \def\mathclap{\mathpalette\mathclapinternal} \def\mathllapinternal#1#2{\llap{$\mathsurround=0pt#1{#2}$}} \def\mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}} \def\mathclapinternal#1#2{\clap{$\mathsurround=0pt#1{#2}$}} % Renames \sqrt as \oldsqrt and redefine root to result in \sqrt[#1]{#2} \let\oldroot\root \def\root#1#2{\oldroot #1 \of{#2}} \renewcommand{\sqrt}[2][]{\oldroot #1 \of{#2}} % Manually declare the txfonts symbolsC font \DeclareSymbolFont{symbolsC}{U}{txsyc}{m}{n} \SetSymbolFont{symbolsC}{bold}{U}{txsyc}{bx}{n} \DeclareFontSubstitution{U}{txsyc}{m}{n} % Manually declare the stmaryrd font \DeclareSymbolFont{stmry}{U}{stmry}{m}{n} \SetSymbolFont{stmry}{bold}{U}{stmry}{b}{n} % Manually declare the MnSymbolE font \DeclareFontFamily{OMX}{MnSymbolE}{} \DeclareSymbolFont{mnomx}{OMX}{MnSymbolE}{m}{n} \SetSymbolFont{mnomx}{bold}{OMX}{MnSymbolE}{b}{n} \DeclareFontShape{OMX}{MnSymbolE}{m}{n}{ <-6> MnSymbolE5 <6-7> MnSymbolE6 <7-8> MnSymbolE7 <8-9> MnSymbolE8 <9-10> MnSymbolE9 <10-12> MnSymbolE10 <12-> MnSymbolE12}{} % Declare specific arrows from txfonts without loading the full package \makeatletter \def\re@DeclareMathSymbol#1#2#3#4{% \let#1=\undefined \DeclareMathSymbol{#1}{#2}{#3}{#4}} \re@DeclareMathSymbol{\neArrow}{\mathrel}{symbolsC}{116} \re@DeclareMathSymbol{\neArr}{\mathrel}{symbolsC}{116} \re@DeclareMathSymbol{\seArrow}{\mathrel}{symbolsC}{117} \re@DeclareMathSymbol{\seArr}{\mathrel}{symbolsC}{117} \re@DeclareMathSymbol{\nwArrow}{\mathrel}{symbolsC}{118} \re@DeclareMathSymbol{\nwArr}{\mathrel}{symbolsC}{118} \re@DeclareMathSymbol{\swArrow}{\mathrel}{symbolsC}{119} \re@DeclareMathSymbol{\swArr}{\mathrel}{symbolsC}{119} \re@DeclareMathSymbol{\nequiv}{\mathrel}{symbolsC}{46} \re@DeclareMathSymbol{\Perp}{\mathrel}{symbolsC}{121} \re@DeclareMathSymbol{\Vbar}{\mathrel}{symbolsC}{121} \re@DeclareMathSymbol{\sslash}{\mathrel}{stmry}{12} \re@DeclareMathSymbol{\boxslash}{\mathrel}{stmry}{27} \re@DeclareMathSymbol{\boxbslash}{\mathrel}{stmry}{28} \re@DeclareMathSymbol{\boxast}{\mathrel}{stmry}{24} \re@DeclareMathSymbol{\boxcircle}{\mathrel}{stmry}{29} \re@DeclareMathSymbol{\boxbox}{\mathrel}{stmry}{30} \re@DeclareMathSymbol{\obslash}{\mathrel}{stmry}{20} \re@DeclareMathSymbol{\obar}{\mathrel}{stmry}{58} \re@DeclareMathSymbol{\olessthan}{\mathrel}{stmry}{60} \re@DeclareMathSymbol{\ogreaterthan}{\mathrel}{stmry}{61} \re@DeclareMathSymbol{\bigsqcap}{\mathop}{stmry}{"64} \re@DeclareMathSymbol{\biginterleave}{\mathop}{stmry}{"6} \re@DeclareMathSymbol{\invamp}{\mathrel}{symbolsC}{77} \re@DeclareMathSymbol{\parr}{\mathrel}{symbolsC}{77} \makeatother % \llangle, \rrangle, \lmoustache and \rmoustache from MnSymbolE \makeatletter \def\Decl@Mn@Delim#1#2#3#4{% \if\relax\noexpand#1% \let#1\undefined \fi \DeclareMathDelimiter{#1}{#2}{#3}{#4}{#3}{#4}} \def\Decl@Mn@Open#1#2#3{\Decl@Mn@Delim{#1}{\mathopen}{#2}{#3}} \def\Decl@Mn@Close#1#2#3{\Decl@Mn@Delim{#1}{\mathclose}{#2}{#3}} \Decl@Mn@Open{\llangle}{mnomx}{'164} \Decl@Mn@Close{\rrangle}{mnomx}{'171} \Decl@Mn@Open{\lmoustache}{mnomx}{'245} \Decl@Mn@Close{\rmoustache}{mnomx}{'244} \Decl@Mn@Open{\llbracket}{stmry}{'112} \Decl@Mn@Close{\rrbracket}{stmry}{'113} \makeatother % Widecheck \makeatletter \DeclareRobustCommand\widecheck[1]{{\mathpalette\@widecheck{#1}}} \def\@widecheck#1#2{% \setbox\z@\hbox{\m@th$#1#2$}% \setbox\tw@\hbox{\m@th$#1% \widehat{% \vrule\@width\z@\@height\ht\z@ \vrule\@height\z@\@width\wd\z@}$}% \dp\tw@-\ht\z@ \@tempdima\ht\z@ \advance\@tempdima2\ht\tw@ \divide\@tempdima\thr@@ \setbox\tw@\hbox{% \raise\@tempdima\hbox{\scalebox{1}[-1]{\lower\@tempdima\box \tw@}}}% {\ooalign{\box\tw@ \cr \box\z@}}} \makeatother % \mathraisebox{voffset}[height][depth]{something} \makeatletter \NewDocumentCommand\mathraisebox{moom}{% \IfNoValueTF{#2}{\def\@temp##1##2{\raisebox{#1}{$\m@th##1##2$}}}{% \IfNoValueTF{#3}{\def\@temp##1##2{\raisebox{#1}[#2]{$\m@th##1##2$}}% }{\def\@temp##1##2{\raisebox{#1}[#2][#3]{$\m@th##1##2$}}}}% \mathpalette\@temp{#4}} \makeatletter % udots (taken from yhmath) \makeatletter \def\udots{\mathinner{\mkern2mu\raise\p@\hbox{.} \mkern2mu\raise4\p@\hbox{.}\mkern1mu \raise7\p@\vbox{\kern7\p@\hbox{.}}\mkern1mu}} \makeatother %% Fix array \newcommand{\itexarray}[1]{\begin{matrix}#1\end{matrix}} %% \itexnum is a noop \newcommand{\itexnum}[1]{#1} %% Renaming existing commands \newcommand{\underoverset}[3]{\underset{#1}{\overset{#2}{#3}}} \newcommand{\widevec}{\overrightarrow} \newcommand{\darr}{\downarrow} \newcommand{\nearr}{\nearrow} \newcommand{\nwarr}{\nwarrow} \newcommand{\searr}{\searrow} \newcommand{\swarr}{\swarrow} \newcommand{\curvearrowbotright}{\curvearrowright} \newcommand{\uparr}{\uparrow} \newcommand{\downuparrow}{\updownarrow} \newcommand{\duparr}{\updownarrow} \newcommand{\updarr}{\updownarrow} \newcommand{\gt}{>} \newcommand{\lt}{<} \newcommand{\map}{\mapsto} \newcommand{\embedsin}{\hookrightarrow} \newcommand{\Alpha}{A} \newcommand{\Beta}{B} \newcommand{\Zeta}{Z} \newcommand{\Eta}{H} \newcommand{\Iota}{I} \newcommand{\Kappa}{K} \newcommand{\Mu}{M} \newcommand{\Nu}{N} \newcommand{\Rho}{P} \newcommand{\Tau}{T} \newcommand{\Upsi}{\Upsilon} \newcommand{\omicron}{o} \newcommand{\lang}{\langle} \newcommand{\rang}{\rangle} \newcommand{\Union}{\bigcup} \newcommand{\Intersection}{\bigcap} \newcommand{\Oplus}{\bigoplus} \newcommand{\Otimes}{\bigotimes} \newcommand{\Wedge}{\bigwedge} \newcommand{\Vee}{\bigvee} \newcommand{\coproduct}{\coprod} \newcommand{\product}{\prod} \newcommand{\closure}{\overline} \newcommand{\integral}{\int} \newcommand{\doubleintegral}{\iint} \newcommand{\tripleintegral}{\iiint} \newcommand{\quadrupleintegral}{\iiiint} \newcommand{\conint}{\oint} \newcommand{\contourintegral}{\oint} \newcommand{\infinity}{\infty} \newcommand{\bottom}{\bot} \newcommand{\minusb}{\boxminus} \newcommand{\plusb}{\boxplus} \newcommand{\timesb}{\boxtimes} \newcommand{\intersection}{\cap} \newcommand{\union}{\cup} \newcommand{\Del}{\nabla} \newcommand{\odash}{\circleddash} \newcommand{\negspace}{\!} \newcommand{\widebar}{\overline} \newcommand{\textsize}{\normalsize} \renewcommand{\scriptsize}{\scriptstyle} \newcommand{\scriptscriptsize}{\scriptscriptstyle} \newcommand{\mathfr}{\mathfrak} \newcommand{\statusline}[2]{#2} \newcommand{\tooltip}[2]{#2} \newcommand{\toggle}[2]{#2} % Theorem Environments \theoremstyle{plain} \newtheorem{theorem}{Theorem} \newtheorem{lemma}{Lemma} \newtheorem{prop}{Proposition} \newtheorem{cor}{Corollary} \newtheorem*{utheorem}{Theorem} \newtheorem*{ulemma}{Lemma} \newtheorem*{uprop}{Proposition} \newtheorem*{ucor}{Corollary} \theoremstyle{definition} \newtheorem{defn}{Definition} \newtheorem{example}{Example} \newtheorem*{udefn}{Definition} \newtheorem*{uexample}{Example} \theoremstyle{remark} \newtheorem{remark}{Remark} \newtheorem{note}{Note} \newtheorem*{uremark}{Remark} \newtheorem*{unote}{Note} %------------------------------------------------------------------- \begin{document} %------------------------------------------------------------------- \section*{Code} \hypertarget{source_code_on_the_fortran_wiki}{}\subsection*{{Source Code on the Fortran Wiki}}\label{source_code_on_the_fortran_wiki} When contributing code, please specify a license so that others know the extent to which they may use and modify your code. \textbf{All code on the [[Fortran Wiki]] shall be in the [[Public domain|public domain]] unless otherwise noted.} Other common licenses are the [[BSD license|BSD]], [[MIT license|MIT]], and [[GPL license|GPL]] licenses. To contribute Fortran source code, add a link here to the filename, program, or module name, and create the new page by pasting the code, wrapping it in a fenced code block with a language keyword. See the [[HowTo]] and existing pages such as [[hello]] for examples. \begin{itemize}% \item [[allocate\_coin\_toss]] - dynamic memory allocation example. \item [[ansi\_colors]] - simple module illustrating how to produce ANSI color escape codes for terminal output. \item [[asa2pdf]] - convert files using ASA carriage control to an Adobe PDF \item [[c\_interface\_module]] - supplemental types and functions for ISO-C-Binding \item [[d2u]](1f) - example of stream I/O; this program converts clear ASCII text files between Unix and DOS line terminator conventions. \item [[differentiation]] - functions for numerical differentiation of arrays. \item [[expand]] - expand C-like escape sequences in a string. \item [[extend\_dble]] example of extending a function (in this case, the intrinsic DBLE()) \item [[fdate]] - example use of [[date\_and\_time]](3f) \item [[File\_Name\_Generator]] - to whom bothering building a file name string with integer or using internal write \item [[gen\_list]] - a [[Generic programming|generic]] [[Linked list|linked list]] example. \item [[getopt\_long\_module]] - Fortran equivalent of C getopt\_long \item [[getvals]] - read an arbitrary number of numeric values from a line \item [[hash table example]] - an example implementation of [[Hash tables|hash tables]]. \item [[hash value example]] - an example implementation generating a hash value (a CRC-32 value is calculated for a list of files). \item [[hello]] - hello, world in [[Fortran 90]]. \item [[init\_seed]] - random number generator seeding example. \item [[integration]] - functions for numerical integration of arrays. \item [[interface\_mod]] - an example of defining interfaces in a module. \item [[internalproc]] - internal procedure example. \item [[interpolation]] - functions for numerical interpolation of arrays. \item [[inv]] - matrix inversion via LAPACK. \item [[jucolor]] - A small collection of color model conversion routines. \item [[kiss64]] - a 64-bit random number generator by George Marsaglia. \item [[kracken]] - a module for cracking command line arguments \item [[get\_namelist]] - read command line arguments using NAMELIST \item [[namelist\_prompter]] - read values by name interactively using NAMELIST \item [[M\_color]] - simple conversions between common color models \item [[m\_process]] - a module for calling popen(3c) using the intrinsic ISO\_C\_BINDING module \item [[M\_slurp]] - creating text filters \item [[m\_strings]] - a module for manipulating and formatting strings \item [[m\_system]] - a module that allows calling many of the C POSIX procedures via the ISO\_C\_BINDING intrinsic module \item [[match\_wild]] - wild-card string matching \item [[mm\_ioutils]] - a library for easier I/O in Fortran. \item [[notab]](3f) - expand tab characters in input lines \item [[notopen]](3f) - find unused file unit number \item [[newunit]] - [[Joe Krahn|Joe]]`s find unused file unit number \item [[opover]] - simple example of operator overload \item [[pointer\_example]] - an example of pointer usage. \item [[iso\_readline(3f)]] - calling the GNU C routine readline(3c) using the [[Fortran 2003]] [[iso\_c\_binding]] module. \item [[proc\_component\_example]] - procedure component example. \item [[qsort\_inline]] - a fast inline quick+insertion sort \item [[read\_gif]] - reads GIF file into array \item [[readline]] - example that reads a line of arbitrary length \item [[regex\_module]] - Interface to POSIX regex routines \item [[roach]](3f) - write large block letters \item [[scramble]](3f) - example of permuting a list \item [[spoiler]] - encode and decode messages trivially encrypted with the ROT13 algorithm \item [[stderr]](3f) - example of writing to ``stderr'' \item [[strnum]] - example illustrating conversion of numeric values to strings and vice-versa. \item [[strtok]](3f) - read tokens from a line in a manner similar to the C routine strtok \item [[swap]] - example of using unlimited polymorphic variables to make a generic swap routine \item [[tostring]](3f) - example of polymorphic class converts values to a string \item [[ttee]] - a ``timed tee'' -- write stdout to stdin and another file with an optional date/time prefix. \item [[transfer\_ex]] - example of the transfer intrinsic. \item [[use\_test]] - an example of nested use statements \item [[f\_uname]] - call uname(3c) using ISO\_C\_BINDING and a C procedure \item [[ufpp]] - a Fortran pre-processor written in Fortran \item [[writegif]] - writes an image into a GIF file. \item [[what]] - The what(1) command re-implemented in Fortran \item [[happy\_new\_year]] - Write happy new year and example of transfer \item [[Quartiles]] - Calculating Quartiles in Fortran in 3 different method. \item [[SVD]] - Program computes the matrix singular value decomposition \item [[Time In Words]] - Program displays time in words \item [[Validate Credit-Debit card number program]] - Fortran code to Validate Credit/Debit card number program \item [[Reading Ansys Sub Structure analysis file]] Reading Stiffness/Mass matrices from Ansys Sub Structure Analysis output file. \item [[wc]] - a word count utility. \item [[xxenv]] - example of accessing Environment Table \item [[String\_Functions]] - a module of string processing routines. \end{itemize} \hypertarget{code_available_elsewhere}{}\subsection*{{Code Available Elsewhere}}\label{code_available_elsewhere} This section lists individual modules, programs, and procedures, typically single files or perhaps zip files. See the [[Libraries]] page for more comprehensive collections of routines. \begin{itemize}% \item \href{ftp://ftp.numerical.rl.ac.uk/pub/MandR/convert.f90}{convert.f90} - converts [[FORTRAN 77]] source form to [[Fortran 90]] source form. \item \href{http://fortran.com/gen_ll.f90}{gen\_ll.f90} - a generic [[Linked list|linked list]] module by Roger Young and Peter McGavin. \item \href{http://fortran.com/roman_numerals.f90}{roman\_numerals.f90} - a Roman numerals module. \item \href{http://fortran.com/qsort_c.f95}{qsort\_c.f95} - a recursive [[Fortran 95]] quicksort routine. \item \href{http://davidfritz.wordpress.com/2009/04/22/fortran-radix-sort/}{RadixSort.f90} - radix sort in [[Fortran 90]]. \item \href{https://genepi.qimr.edu.au/Staff/davidD/Scheme/fscheme_mod.f95.gz}{fscheme\_mod.f95} - an embeddable Scheme interpreter (with bindings for the \href{http://www.japi.de/}{Japi} GUI toolkit). \item \href{http://sukhbinder.wordpress.com/2010/07/20/fortran-90-with-excel-gfortran-example/}{Fortran with Excel} -A gfortran example to call fortran from excel \item \href{http://sukhbinder.wordpress.com/2011/04/14/how-to-create-fortran-dll-in-visual-studio-with-intel-fortran-compiler/}{How to Create Fortran DLL in Visual studio} - A google powerpoint presentation on how to create a fortran DLL with Intel Compiler in Visual Studio 2005/2008 \item \href{http://sukhbinder.wordpress.com/2011/08/07/stl-files-and-fortran/}{Binary STL file reader in fortran} Binary STL file reader in fortran \item \href{http://wwwep.stewartsplace.org.uk/quines/f90.html}{Quine in fortran 90} While Fortran has been thought to develop scientific applications, it can also be used for programmer amusement, here is a nice quine written in Fortran. A quine is a computer program which takes no input and produces a copy of its own source code as its only output. \item \href{http://sukhbinder.wordpress.com/2012/01/16/let-it-snow-in-fortran-the-code/}{Let It Snow in Fortran} Inspired by google's let it snow, this is let it snow animation in fortran using pgplot graphics library. \item \href{http://sukhbinder.wordpress.com/2012/01/25/neutron-collisions-stanislaw-ulam-solitares-and-my-pgplot-practice/}{Value of PI by Monte Carlo Method} Fortran code to determine the value of PI using Monte Carlo Method. \item \href{http://sukhbinder.wordpress.com/2012/01/06/how-to-create-pgplot-fortran-programs-with-intel-compiler/}{How to use Pgplot graphics library to create Fortran graphic programs?} \item \href{http://sukhbinder.wordpress.com/2011/08/26/fireworks-animation-in-fortran-using-pgplot/}{Fireworks animation in Fortran} Fireworks animation using Fortran PGPLOT libraries. \item \href{http://sukhbinder.wordpress.com/2012/01/18/heart-in-fortran/}{Heart in Fortran} Generating Heart with Fortran code using pgplot. \item \href{https://github.com/kookma/ogpf}{ogpf} An object-based Fortran 2003 / 2008 interface to gnuplot. \item \href{http://sukhbinder.wordpress.com/2012/03/28/hermite-polynomials/}{Hermite Polynomial} Fortran module to generate hermite polynomials \item \href{http://sukhbinder.wordpress.com/2012/03/01/fortran-module-for-non-uniform-random-number-generation/}{Random number generator codes in fortran for probability distribution} Fortran module to generate non-uniform random numbers \item \href{http://sukhbinder.wordpress.com/2012/02/06/fortran-module-to-export-fortran-code-to-html/}{Fortran Module to Export Fortran code to HTML} \item \href{http://sukhbinder.wordpress.com/2012/07/28/automatic-differentiation-and-dual-numbers/}{Basic Fortran Module for Dual Numbers} \item \href{http://sukhbinder.wordpress.com/2012/08/18/plate-mesh-file/}{Fortran program to generate a patran neutral mesh file for a simple plate with custom amount of 4 noded quad elements.} \item \href{http://sukhbinder.wordpress.com/2013/11/07/fortran-program-to-create-find-the-word-puzzle/}{Fortran program to create Word Search Puzzles.} \item \href{http://sukhbinder.wordpress.com/2012/09/24/integrating-fortran-with-java-in-windows/}{A Beginners Guide to Integrate java and Fortran in windows} Simple tutorial on mixing JAVA and Fortran \item \href{http://sukhbinder.wordpress.com/2014/01/28/a-simple-fortran-transformation-module/}{A Simple Fortran Transformation Module} \end{itemize} category: code \end{document}

AltStyle によって変換されたページ (->オリジナル) /