<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — Scan string handling function]]></title>
	<link rel="self" href="http://forums.approximatrix.com/extern.php?action=feed&amp;tid=933&amp;type=atom" />
	<updated>2023-12-22T19:33:07Z</updated>
	<generator>PunBB</generator>
	<id>http://forums.approximatrix.com/viewtopic.php?id=933</id>
		<entry>
			<title type="html"><![CDATA[Re: Scan string handling function]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=4267#p4267" />
			<content type="html"><![CDATA[<p>Yes, your arguments are backwards in the calls to <a href="https://simplyfortran.com/docs/compiler/SCAN.html#SCAN">scan</a>.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2023-12-22T19:33:07Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=4267#p4267</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Scan string handling function]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=4266#p4266" />
			<content type="html"><![CDATA[<p>You misunderstand position of set and string in scan definition. Invert blk and text2 or text3.</p>]]></content>
			<author>
				<name><![CDATA[Almoro]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=4159</uri>
			</author>
			<updated>2023-12-22T17:42:46Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=4266#p4266</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Scan string handling function]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=4265#p4265" />
			<content type="html"><![CDATA[<p>With the simple program:</p><p>&nbsp; &nbsp; program main<br />&nbsp; &nbsp; implicit none<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; integer:: i, j, k, l<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; character*13:: text2 = &#039;&amp;&amp;&amp;&amp;45678.2&amp;3&#039;<br />&nbsp; &nbsp; character*13:: text3 = &#039;123445678.2&amp;3&#039;<br />&nbsp; &nbsp; character*1:: blk = &#039;&amp;&#039;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; open(10, file=&#039;output.txt&#039;, status = &#039;unknown&#039;)<br />&nbsp; &nbsp;<br />&nbsp; &nbsp; i = scan(blk,text2,back=.true.) <br />&nbsp; &nbsp; j = scan(blk,text2,back=.false.)<br />&nbsp; &nbsp; write(10,*)&#039;i,j=&#039;,i,j<br />&nbsp; &nbsp;<br />&nbsp; &nbsp; k = scan(blk,text3,back=.true.) <br />&nbsp; &nbsp; l = scan(blk,text3,back=.false.)<br />&nbsp; &nbsp; write(10,*)&#039;k,l=&#039;,k,l<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; close (10)<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; end program main</p><p>I read in my outpufile output.txt the following values: i = 1, j = 1, k = 1, l = 1. So it looks that scan does not return the position of &quot;blk&quot; in text2 and text3 as I understand it should be. Thx in advance and sorry for the trivial question.</p>]]></content>
			<author>
				<name><![CDATA[Almoro]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=4159</uri>
			</author>
			<updated>2023-12-22T16:04:32Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=4265#p4265</id>
		</entry>
</feed>
