文書整形 -- テキストの書き出し2016年12月10日 18:40

指令以外の行は、テキストである。これを書き出すルーチンtext()の 臨時第一版を示す。この版は下請けルーチンput()を呼び出すだけである。

RATFORでは、

# text.r4 -- process text lines (interim version 1)
      subroutine text(inbuf)
      character inbuf(INSIZE)

      call put(inbuf)
      return
      end

WATCOM fortran 77では、

c text.f -- process text lines (interim version 1)
      subroutine text(inbuf)
      integer*1 inbuf(82)               ! INSIZE(82)

      call put(inbuf)
      return
      end

下請けルーチンput()では、ページのレイアウトを考慮した出力が作り出される。

RATFOR版は、以下の通り。

# put.r4 -- put out line with proper spacing and indenting
      subroutine put(buf)
      character buf(MAXLINE)
      integer min
      integer i
      include cpage.ri
      include cparam.ri

      if (lineno == 0 | lineno > bottom)
          call phead

      for (i = 1; i <= tival; i = i + 1) # indenting
          call putc(BLANK)
      tival = inval
      call putlin(buf,STDOUT)
      call skip(min(lsval-1,bottom-lineno))
      lineno = lineno + lsval
      if (lineno > bottom)
          call pfoot
      return
      end

WATCOM fortran77版は、以下の通り。

c put.f -- put out line with proper spacing and indenting
      subroutine put(buf)
      integer*1 buf(82)                 ! MAXLINE(82)
      integer min
      integer i
      include cpage.fi
      include cparam.fi

      if ((lineno .eq. 0) .or. (lineno .gt. bottom)) then
          call phead
      end if

      i = 1                             ! indenting
      while (i .le. tival) do
          call putc(32)                 ! BLANK(32)
          i = i + 1
      end while

      tival = inval
      call putlin(buf,6)                ! STDOUT(6)
      call skip(min(lsval-1,bottom-lineno))
      lineno = lineno + lsval

      if (lineno .gt. bottom) then
          call pfoot
      end if
      return
      end

ページ見出し、ヘッダーとフッターは、phead()、pfoot()で書き出す。 put()は、これらを適当な位置で書き出すよう制御する。

phead()のRATFOR版は、以下の通り。

# phead.r4 -- put out page header
      subroutine phead
      include cpage.ri

      curpag = newpag
      newpag = newpag + 1
      if (m1val > 0) {
         call skip(m1val - 1)
         call puttl(header,curpag)
         }
      call skip(m2val)
      lineno = m1val + m2val + 1
      return
      end

WATCOM fortran 77版は、以下の通り。

c phead.f -- put out page header
      subroutine phead
      include cpage.fi

      curpag = newpag
      newpag = newpag + 1
      if (m1val .gt. 0) then
         call skip(m1val-1)
         call puttl(header,curpag)
      end if
      call skip(m2val)
      lineno = m1val + m2val + 1
      return
      end

pfoot()のRATFOR版は、以下の通り。

# pfoot.r4 -- put out page footer
      subroutine pfoot
      include cpage.ri

      call skip(m3val)
      if (m4val > 0) {
         call puttl(footer,curpag)
         call skip(m4val - 1)
         }

      return
      end

WATCOM fortran 77版は、以下の通り。

c pfoot.f -- put out page footer
      subroutine pfoot
      include cpage.fi

      call skip(m3val)
      if (m4val .gt. 0) then
         call puttl(footer,curpag)
         call skip(m4val - 1)
      endif

      return
      end

phead()、pfoot()とも、ページ見出しの書き出しはputtl()を使用する。 puttl()は、書き出す内容にPAGEMUN記号("#")が含まれていた場合、 その場所にページ番号を入れ込む。

puttl()のRATFOR版は、以下の通り。

# puttl.r4 -- put title line with optional page number
      subroutine puttl(buf,pageno)
      character buf(MAXLINE)
      integer pageno
      integer i

      for (i = 1; buf(i) != EOS; i = i + 1)
          if (buf(i) == PAGENUM)
              call putdec(pageno,1)
          else
              call putc(buf(i))
      return
      end

WATCOM fortran 77版は、以下の通り。

c puttl.for -- put title line with optional page number
      subroutine puttl(buf,pageno)
      integer*1 buf(82)                 ! MAXLINE(82)
      integer pageno
      integer i

      i = 1
      while (buf(i) .ne. -2) do         ! EOS(-2)
          if (buf(i) .eq. 35) then      ! PAGENUM('#',35)
              call putdec(pageno,1)
          else
              call putc(buf(i))
          end if
          i = i + 1
      end while
      return
      end

ページ見出しは、gettl()でページ見出し用のバッファーにセットする。

gettl()のRATFOR版は、以下の通り。

# gettl.r4 -- copy title from buf to ttl
      subroutine gettl(buf,ttl)
      character buf(MAXLINE),ttl(MAXLINE)
      integer i

      i = 1                             # skip command name
      while ( buf(i) != BLANK & buf(i) != TAB & buf(i) != NEWLINE )
          i = i + 1
      call skipbl(buf,i)                # find argument
      if (buf(i) == SQUORT | buf(i) == DQUORT) # strip quorte if found
          i = i + 1
      call scopy(buf, i, ttl, 1)
      return
      end

WATCOM fortran 77版は、以下の通り。

c gettl.for -- copy title from buf to ttl
      subroutine gettl(buf,ttl)
      integer*1 buf(82),ttl(82)         ! MAXLINE(82) MAXLINE(82)
      integer i

      i = 1                             ! skip command name
      while ((buf(i) .ne. 32)           ! BLANK(32)
     1    .and. (buf(i) .ne. 9)         ! TAB(9)
     2    .and. (buf(i) .ne. 10)) do    ! NEWLINE(10)
          i = i + 1
      end while

      call skipbl(buf,i)                ! find argument
      if ((buf(i) .eq. 39)
     1    .or. (buf(i) .eq. 34)) then   ! strip quorte if found SQUOTE(''',39) DQUOTE('"',34)
          i = i + 1
      end if
      call scopy(buf,i,ttl,1)
      return
      end

".sp"指令や".bp"指令は、space()で空行を出力しページレイアウトを 調整する。

space()のRATFOR版は、以下の通り。

# space.r4 -- space n lines or to bottom of page
      subroutine space(n)
      integer n
      integer min
      include cpage.ri

      call brk
      if (lineno > bottom)
          return
      if (lineno == 0)
          call phead
      call skip(min(n, bottom + 1 - lineno))
      lineno = lineno + n
      if (lineno > bottom)
          call pfoot
      return
      end

WATCOM fortran 77版は、以下の通り。

c space.f -- space n lines or to bottom of page
      subroutine space(n)
      integer n
      integer min
      include cpage.fi

      call brk
      if (lineno .gt. bottom) then
          return
      end if
      if (lineno .eq. 0) then
          call phead
      end if
      call skip(min(n,bottom+1-lineno))
      lineno = lineno + n
      if (lineno .gt. bottom) then
          call pfoot
      end if
      return
      end

コメント

_ tinder dating site ― 2017年02月26日 02:28

Hi there everyone, it&#39;s my first pay a quick visit at this web page,
and article is in fact fruitful for me, keep up posting these
types of content.

_ tinder dating site ― 2017年02月26日 08:57

Can I simply say what a relief to discover someone that truly understands what they&#39;re discussing on the net.

You actually realize how to bring a problem to light and make it
important. More people must look at this and understand this
side of the story. I can&#39;t believe you are not
more popular because you most certainly possess the gift.

_ tinder dating site ― 2017年02月28日 00:06

whoah this weblog is excellent i like studying your
articles. Keep up the good work! You know, lots of persons are searching
around for this information, you could aid them greatly.

_ tinder dating site ― 2017年03月01日 03:54

Cool blog! Is your theme custom made or did you download it from
somewhere? A design like yours with a few simple
adjustements would really make my blog jump out.
Please let me know where you got your theme.
Thank you

_ tinder dating site ― 2017年03月02日 03:52

I have been exploring for a little bit for any high quality
articles or blog posts on this kind of area . Exploring in Yahoo I eventually stumbled upon this web site.
Studying this information So i am satisfied to show that
I&#39;ve an incredibly good uncanny feeling I found out exactly what I needed.

I such a lot no doubt will make certain to do not disregard this
site and provides it a look on a relentless basis.

_ minecraft ― 2017年03月03日 07:32

Wonderful blog you have here but I was wondering if you knew of any discussion boards that cover the
same topics talked about here? I&#39;d really love to be a
part of online community where I can get comments from other knowledgeable individuals that share the same interest.

If you have any recommendations, please let me know. Thank you!

_ minecraft ― 2017年03月07日 15:26

Having read this I thought it was rather enlightening.

I appreciate you finding the time and effort to put this
content together. I once again find myself personally spending a significant amount of time both reading and leaving comments.
But so what, it was still worth it!

_ Online Dating Sites Lancaster California ― 2017年03月07日 21:08

Thank you a bunch for sharing this with all folks you really recognise what you
are talking about! Bookmarked. Kindly also talk over with
my website =). We could have a link exchange arrangement among us

_ manicure ― 2017年03月09日 18:17

You&#39;re so cool! I do not think I&#39;ve truly read a single thing like that before.

So wonderful to discover another person with unique thoughts on this
topic. Seriously.. many thanks for starting this up. This site
is one thing that is needed on the internet, someone with a bit of
originality!

_ hermosabeach.mrdrain.com ― 2017年03月10日 01:19

Hello! I just wanted to ask if you ever have any trouble with hackers?

My last blog (wordpress) was hacked and I ended up
losing many months of hard work due to no back up.
Do you have any solutions to prevent hackers?

_ tinyurl.com ― 2017年03月11日 00:32

I was wondering if you ever considered changing the
structure of your website? Its very well written; I love
what youve got to say. But maybe you could a little more in the way of content so people could connect with it better.
Youve got an awful lot of text for only having one or 2 images.
Maybe you could space it out better?

_ http://tinyurl.com/hkvzakr ― 2017年03月11日 07:32

Way cool! Some very valid points! I appreciate you writing this write-up and the rest of the website is extremely good.

_ http://tinyurl.com/jemtgte ― 2017年03月11日 19:51

You&#39;ve made some really good points there.
I checked on the web for more information about the issue and found most
people will go along with your views on this web site.

_ tinyurl.com ― 2017年03月11日 23:25

It&#39;s really a nice and helpful piece of information. I&#39;m happy that you shared this useful info with
us. Please keep us informed like this. Thank you for sharing.

_ j.mp ― 2017年03月12日 05:18

I was suggested this web site by my cousin. I am not
sure whether this post is written by him as no one else know such
detailed about my difficulty. You are amazing! Thanks!

_ tinder dating site ― 2017年03月14日 04:18

Great article.

_ tinder dating site ― 2017年03月17日 21:46

Hi there to every body, it&#39;s my first visit of this blog; this weblog includes amazing and genuinely excellent information in favor of
visitors.

_ tinder dating site ― 2017年03月19日 10:14

This information is invaluable. When can I find out more?

_ free dating sites no fees ― 2017年03月21日 23:58

It&#39;s great that you are getting thoughts from this article as well as from our argument made at this time.

_ free dating no money needed ― 2017年03月22日 06:52

You have made some decent points there. I looked on the net
to find out more about the issue and found most people will go along with your views on this website.

_ free dating sites no fees ― 2017年03月23日 07:02

When I initially commented I clicked the &quot;Notify me when new comments are added&quot; checkbox and now each time a comment is added I get four e-mails with the same comment.
Is there any way you can remove me from that service? Thank you!

_ free dating sites australia ― 2017年03月23日 10:45

An impressive share! I&#39;ve just forwarded this onto a coworker who has been conducting a little homework on this.
And he actually bought me breakfast because I stumbled upon it for him...
lol. So let me reword this.... Thanks for the meal!! But yeah, thanks for spending some time to discuss this topic here on your site.

_ planet minecraft ― 2017年03月26日 02:46

Very nice post. I just stumbled upon your
blog and wanted to say that I&#39;ve truly enjoyed browsing your blog posts.

In any case I will be subscribing to your feed and I hope you write
again soon!

_ manicure ― 2017年04月03日 11:28

I am extremely inspired with your writing skills as well as with the structure on your weblog.

Is that this a paid subject or did you customize it yourself?
Either way stay up the excellent quality writing, it is uncommon to look a great weblog like this one these days..

_ BHW ― 2017年04月12日 20:27

Hi my friend! I wish to say that this post is amazing,
nice written and include almost all important infos.
I would like to look extra posts like this .

_ BHW ― 2017年04月15日 00:40

Your style is really unique compared to other folks I&#39;ve read stuff from.
Thanks for posting when you&#39;ve got the opportunity, Guess I&#39;ll just book mark this blog.

_ www.krogerfeedback.com ― 2017年04月29日 05:20

There is certainly a great deal to know about this topic.

I like all of the points you made.

_ www.krogerfeedback.com ― 2017年05月01日 05:17

Great post. I used to be checking continuously this
blog and I am impressed! Very useful information particularly the remaining
phase :) I maintain such info a lot. I used to
be looking for this particular info for a very lengthy time.
Thanks and best of luck.

_ jaquelynramelli.hatenablog.com ― 2017年05月02日 09:36

These are really impressive ideas in on the topic of blogging.
You have touched some good points here. Any way keep up wrinting.

_ manicure ― 2017年05月03日 12:42

I do consider all the ideas you&#39;ve offered in your post.
They are very convincing and can definitely work.
Still, the posts are too short for beginners. May just you please
prolong them a bit from subsequent time? Thanks for the post.

_ Minecraft ― 2017年05月19日 21:05

Great article. I will be going through some of these issues as
well..

_ Minecraft ― 2017年05月20日 06:32

Hey there just wanted to give you a quick heads up. The words in your content seem to be running off the screen in Opera.
I&#39;m not sure if this is a formatting issue or something to do with internet browser compatibility but I thought
I&#39;d post to let you know. The design look great though!
Hope you get the issue resolved soon. Cheers

_ Minecraft ― 2017年05月20日 07:17

This paragraph presents clear idea for the new viewers of blogging, that in fact how to
do running a blog.

_ Minecraft Maps ― 2017年05月22日 15:32

Hello there! I know this is kinda off topic but I was wondering which
blog platform are you using for this website? I&#39;m getting tired of Wordpress because I&#39;ve had problems with hackers and
I&#39;m looking at options for another platform. I would be fantastic
if you could point me in the direction of a good platform.

_ skate shoes airwalk ― 2017年06月08日 16:36

I rattling glad to find this website on bing, just
what I was looking for :D too saved to bookmarks.

_ instacart coupon ― 2017年08月21日 22:21

Have you ever considered about including a little bit more than just your articles?
I mean, what you say is fundamental and all.
However imagine if you added some great photos or videos to give your posts more,
&quot;pop&quot;! Your content is excellent but with images and videos, this blog could undeniably be one of the greatest in its niche.

Superb blog!

_ http://tinyurl.com ― 2017年08月22日 04:32

Hi colleagues, how is everything, and what you desire to say on the topic of this piece of writing, in my view its really amazing in support of me.

_ tinyurl.com ― 2017年08月22日 15:10

Good blog post. I definitely love this website. Continue the
good work!

_ tinyurl.com ― 2017年08月22日 17:06

I don&#39;t even know how I ended up here, but I thought this post was great.
I don&#39;t know who you are but definitely you&#39;re going to a famous blogger if you are not already ;)
Cheers!

_ http://tinyurl.com/ycpgcg5p ― 2017年08月24日 17:58

I’m not that much of a online reader to be honest
but your blogs really nice, keep it up! I&#39;ll go ahead and
bookmark your site to come back later. Many thanks

_ tinyurl.com ― 2017年08月24日 20:12

hello!,I like your writing very much! percentage
we communicate more approximately your article on AOL?
I require an expert in this house to unravel my problem.
Maybe that is you! Taking a look forward to look you.

_ http://tinyurl.com/ydxerfph ― 2017年08月25日 12:03

What&#39;s up to every one, the contents present at this web page are genuinely remarkable for people experience,
well, keep up the nice work fellows.

_ tinyurl.com ― 2017年08月25日 14:39

Hi there, You&#39;ve done a fantastic job. I&#39;ll definitely digg it and personally recommend to my friends.
I&#39;m confident they&#39;ll be benefited from this website.

_ http://tinyurl.com/ ― 2017年08月25日 15:32

I will right away seize your rss as I can&#39;t to find your email subscription hyperlink or newsletter service.
Do you&#39;ve any? Kindly allow me understand in order that I could subscribe.
Thanks.

_ http://tinyurl.com/ ― 2017年08月25日 23:07

I absolutely love your blog and find almost all of
your post&#39;s to be exactly I&#39;m looking for.
Do you offer guest writers to write content available
for you? I wouldn&#39;t mind creating a post or elaborating on most of the subjects you write
concerning here. Again, awesome site!

_ http://tinyurl.com/ybkgtgh2 ― 2017年08月26日 02:09

Have you ever thought about including a little bit more than just your articles?
I mean, what you say is fundamental and all. But think about if you added some great
images or video clips to give your posts more, &quot;pop&quot;!
Your content is excellent but with images and clips,
this blog could undeniably be one of the most beneficial in its field.
Awesome blog!

_ instacart publix ― 2017年09月28日 11:00

Hello, I think your site might be having browser compatibility issues.
When I look at your blog site in Chrome, it looks fine
but when opening in Internet Explorer, it has some overlapping.
I just wanted to give you a quick heads up!
Other then that, wonderful blog!

_ publix delivery ― 2017年09月29日 00:47

Does your blog have a contact page? I&#39;m having
a tough time locating it but, I&#39;d like to shoot you an email.
I&#39;ve got some ideas for your blog you might be
interested in hearing. Either way, great blog and I
look forward to seeing it develop over time.

_ publix deli online ordering ― 2017年09月29日 05:06

This is a topic that&#39;s close to my heart... Cheers! Where are your contact details though?

_ publix home delivery service ― 2017年09月29日 09:29

Heya i&#39;m for the first time here. I came across this board and I find It really useful &amp; it
helped me out much. I hope to give something back and help others
like you helped me.

※コメントの受付件数を超えているため、この記事にコメントすることができません。

トラックバック

このエントリのトラックバックURL: http://kida.asablo.jp/blog/2016/12/10/8273108/tb