<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent posts to Discussion</title><link>https://sourceforge.net/p/xpl-compiler/discussion/</link><description>Recent posts to Discussion</description><atom:link href="https://sourceforge.net/p/xpl-compiler/discussion/feed.rss" rel="self"/><language>en</language><lastBuildDate>Tue, 18 Mar 2025 03:08:59 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/xpl-compiler/discussion/feed.rss" rel="self" type="application/rss+xml"/><item><title>XPL for Sigma 7 (GORDO)</title><link>https://sourceforge.net/p/xpl-compiler/discussion/general/thread/1e2298f8fa/?limit=25#040f</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I have an XPL XCOM compiler for the Sigma 7 / GORDO OS from 1968 -74    I'd  like to get this this to run.  I have your XPL C package and I intend to compile my XCOM with it to obtain Sigma code.&lt;/p&gt;
&lt;p&gt;The first statement is    DECLARE #.TERMINALS LITERALLY '44', &lt;br/&gt;
Which gives the error   XPL to C language translator -- version 1.2&lt;br/&gt;
1    |    DECLARE #.TERMINALS LITERALLY '44',                                         |&lt;br/&gt;
                  |&lt;br/&gt;
*** Error, Illegal symbol pair: &amp;lt;identifier&amp;gt; &amp;lt;identifier&amp;gt; (detected at line 6448 in xcom). ***&lt;br/&gt;
Partial parse to this point is:  &amp;lt;statement list=""&amp;gt; &amp;lt;identifier&amp;gt;&lt;br/&gt;
1    |    DECLARE #.TERMINALS LITERALLY '44',                                         |&lt;br/&gt;
                   |&lt;br/&gt;
*** Error, Illegal character: 2e (detected at line 1423 in xcom). ***&lt;br/&gt;
*** Last previous error was detected on line 1. ***&amp;lt;/identifier&amp;gt;&amp;lt;/statement&amp;gt;&amp;lt;/identifier&amp;gt;&amp;lt;/identifier&amp;gt;&lt;/p&gt;
&lt;p&gt;Is it true that ketwords like declare and literally must be lower case?&lt;br/&gt;
And, not surprisingly the dot character .  cannot be used in an identifier?&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;Do&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;you&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;think&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;I&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;should&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;modify&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;XPL&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;C&lt;/span&gt;,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;several&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;lines&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;all&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;upper&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;case&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;code&lt;/span&gt;.

&lt;span class="nv"&gt;Thanks&lt;/span&gt;
&lt;span class="nv"&gt;Ken&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">kenr</dc:creator><pubDate>Tue, 18 Mar 2025 03:08:59 -0000</pubDate><guid>https://sourceforge.net60546e0d942736b6edcb0d1ceae0a24f421ae996</guid></item><item><title>Mentoring chats?</title><link>https://sourceforge.net/p/xpl-compiler/discussion/general/thread/5e82386125/?limit=25#1c1a/a51b</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;:-)&lt;/p&gt;
&lt;p&gt;When I get comfortable enough to make the XPL language page on Rosetta, your routine will be put to use for case conversion, not the first day student copy listed above.&lt;/p&gt;
&lt;p&gt;I was about to pester about learning the ins and outs of references vs copies.  REBOL programming seems a little similar in that area.  When to leverage the efficiencies of references and when new copies need to be made.  Thanks for the hint.&lt;/p&gt;
&lt;p&gt;Getting over the first few hurldes, will add base handling to the sum-digits task sample.  Secondary goal after that baby step will be trying to get the same XPL sources compiled and running on MVS 3.8j and with your XPL to C compiler. &lt;/p&gt;
&lt;p&gt;Have good. make well,&lt;br/&gt;
Blue&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brian Tiffin</dc:creator><pubDate>Sat, 01 Aug 2020 04:00:40 -0000</pubDate><guid>https://sourceforge.net852c51b5afed45168cd9791a64f7c42f0f121dc4</guid></item><item><title>Mentoring chats?</title><link>https://sourceforge.net/p/xpl-compiler/discussion/general/thread/5e82386125/?limit=25#1c1a</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The line:&lt;br/&gt;
    total = total + digit - byte('0');&lt;br/&gt;
Should read:&lt;br/&gt;
    total = total * base + digit - byte('0');&lt;/p&gt;
&lt;p&gt;This should work for any base from 2 to 10.&lt;/p&gt;
&lt;p&gt;In my example the function UNIQUE makes a copy of the string so that the uppercase function does not corrupt other strings.&lt;br/&gt;
For Example:&lt;br/&gt;
    stuff = 'abcdef';&lt;br/&gt;
    new_stuff = uppercase(substr(stuff, 1, 3));&lt;br/&gt;
    /&lt;em&gt; Should not corrupt the value of the string "stuff "&lt;/em&gt;/&lt;/p&gt;
&lt;p&gt;It's easy to get a unique copy of a string.  You move it to the top of the free string area.&lt;br/&gt;
Example:&lt;br/&gt;
    new_string = substr('?' || old_string, 1);&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Weaver</dc:creator><pubDate>Sat, 01 Aug 2020 00:38:36 -0000</pubDate><guid>https://sourceforge.nete78034912022537b8e9f29af958bd0589846816d</guid></item><item><title>Mentoring chats?</title><link>https://sourceforge.net/p/xpl-compiler/discussion/general/thread/5e82386125/?limit=25#f198/d7cb</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks again.&lt;/p&gt;
&lt;p&gt;I spent about a year back in the early 80's under a mentor who was the "structured programming, or no programming" type.  &lt;em&gt;Thinking back, he may have been from Denmark and loyal to the likes of Dijkstra.  &amp;lt;joking&amp;gt;&amp;lt;/joking&amp;gt;&lt;/em&gt;  It was good training in goto-less at all costs programming.   :-)&lt;/p&gt;
&lt;p&gt;I'll post more starter questions if/when I put up the Rosetta Code XPL page and some of the simple tasks.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br/&gt;
Blue&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brian Tiffin</dc:creator><pubDate>Fri, 31 Jul 2020 12:35:31 -0000</pubDate><guid>https://sourceforge.net9fed909be91d41e4cea2507aa85a521fd6f948de</guid></item><item><title>Mentoring chats?</title><link>https://sourceforge.net/p/xpl-compiler/discussion/general/thread/5e82386125/?limit=25#91e3/1339</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Nice.  Thanks, Daniel.&lt;/p&gt;
&lt;p&gt;Works the charm.&lt;/p&gt;
&lt;p&gt;Did have to fix the &lt;code&gt;/* */&lt;/code&gt; comments in the first line. SourceForge markup ate the asterisks for italics.  &lt;em&gt;Not a biggy, and on par for SourceForge markdown expectations.&lt;/em&gt;  :-)&lt;/p&gt;
&lt;p&gt;Have good, make well,&lt;br/&gt;
Blue&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brian Tiffin</dc:creator><pubDate>Fri, 31 Jul 2020 11:22:48 -0000</pubDate><guid>https://sourceforge.net3dd24f0ee93f59595186be93a857b7846496b242</guid></item><item><title>Mentoring chats?</title><link>https://sourceforge.net/p/xpl-compiler/discussion/general/thread/5e82386125/?limit=25#f198</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The lack of a BREAK statement in XPL is a problem.  There are a few ways to work around this problem.  Here are some suggestions:&lt;/p&gt;
&lt;p&gt;looping = 1;&lt;br/&gt;
   do while looping;&lt;br/&gt;
         if some_end_condition then looping = 0;&lt;br/&gt;
         /&lt;em&gt; do more stuff &lt;/em&gt;/&lt;br/&gt;
      end;&lt;/p&gt;
&lt;p&gt;/&lt;em&gt; In XPL the upper limit is not recalculated &lt;/em&gt;/&lt;br/&gt;
/&lt;em&gt; This  will not work &lt;/em&gt;/&lt;br/&gt;
x = 100;&lt;br/&gt;
do i = 0 to x;&lt;br/&gt;
    if some_end_condition then x = 0;&lt;br/&gt;
    /&lt;em&gt; ... &lt;/em&gt;/&lt;br/&gt;
 end;&lt;/p&gt;
&lt;p&gt;/&lt;em&gt; But you can change the index variable &lt;/em&gt;/&lt;br/&gt;
 x = 100;&lt;br/&gt;
    do i = 0 to x;&lt;br/&gt;
       if some_end_condition then i = 256;&lt;br/&gt;
       /&lt;em&gt; ... &lt;/em&gt;/&lt;br/&gt;
    end;&lt;/p&gt;
&lt;p&gt;/&lt;em&gt; You can also use the goto statement &lt;/em&gt;/&lt;br/&gt;
    do i = 0 to 100;&lt;br/&gt;
          if some_end_condition then goto exit_label;&lt;br/&gt;
          /&lt;em&gt; ... &lt;/em&gt;/&lt;br/&gt;
       end;&lt;br/&gt;
    exit_lebel:  /&lt;em&gt; Loop escape &lt;/em&gt;/&lt;/p&gt;
&lt;p&gt;/&lt;em&gt; At times I will put the loop into a seperate procedure &lt;/em&gt;/&lt;br/&gt;
search:&lt;br/&gt;
   procedure;&lt;br/&gt;
         do i = 0 to 100;&lt;br/&gt;
              if some_end_condition then return;&lt;br/&gt;
           end;&lt;br/&gt;
    end search;&lt;/p&gt;
&lt;p&gt;Dan&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Weaver</dc:creator><pubDate>Thu, 30 Jul 2020 10:50:57 -0000</pubDate><guid>https://sourceforge.net02a5869664538f1f864812e227139d121937fb33</guid></item><item><title>Mentoring chats?</title><link>https://sourceforge.net/p/xpl-compiler/discussion/general/thread/5e82386125/?limit=25#91e3</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;/&lt;em&gt; lower to UPPER case conversion &lt;/em&gt;/&lt;/p&gt;
&lt;p&gt;declare map(255) bit(8);&lt;/p&gt;
&lt;p&gt;declare shift character initial (&lt;br/&gt;
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');&lt;/p&gt;
&lt;p&gt;initialization:&lt;br/&gt;
   procedure;&lt;br/&gt;
      declare (i, j) fixed;&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;  &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="nv"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="nv"&gt;to&lt;/span&gt; &lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
     &lt;span class="nv"&gt;map&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="nv"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="nv"&gt;to&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="c1"&gt;; &lt;/span&gt;
     &lt;span class="nv"&gt;j&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;byte&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;shift&lt;/span&gt;, &lt;span class="nv"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;26&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
     &lt;span class="nv"&gt;map&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;byte&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;shift&lt;/span&gt;, &lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="ss"&gt;))&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;j&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;end initialization;&lt;/p&gt;
&lt;p&gt;uppercase:&lt;br/&gt;
   procedure(s) character;&lt;br/&gt;
      declare s character,&lt;br/&gt;
         i fixed;&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;  &lt;span class="nv"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;unique&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;s&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="nv"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="nv"&gt;to&lt;/span&gt; &lt;span class="nv"&gt;length&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;s&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
     &lt;span class="nv"&gt;byte&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;s&lt;/span&gt;, &lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;map&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;byte&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;s&lt;/span&gt;, &lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="ss"&gt;))&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;s&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;end uppercase;&lt;/p&gt;
&lt;p&gt;main:&lt;br/&gt;
   procedure;&lt;br/&gt;
      output = 'abc...xyz-&amp;gt;' || uppercase('abc...xyz');&lt;br/&gt;
   end main;&lt;/p&gt;
&lt;p&gt;call initialization;&lt;br/&gt;
call main;&lt;/p&gt;
&lt;p&gt;eof;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Weaver</dc:creator><pubDate>Thu, 30 Jul 2020 10:34:32 -0000</pubDate><guid>https://sourceforge.netd105a7449c998840b6ff23d18e5e7719d3a796e8</guid></item><item><title>Mentoring chats?</title><link>https://sourceforge.net/p/xpl-compiler/discussion/general/thread/5e82386125/?limit=25#9f7d</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Not meaning to pester, Daniel, but also keen and at the bottom of the XPL learning curve.&lt;/p&gt;
&lt;p&gt;Are you up for a few beginner questions here in your discussion forum?&lt;/p&gt;
&lt;p&gt;As a for instance, how would an XPL guru go about defining uppercase(str) and lowercase(str) procedures, given that the code should be EBCDIC and ASCII agnostic, changing the str in place.&lt;/p&gt;
&lt;p&gt;I've tried a few things like &lt;code&gt;byte(str, pos) = byte(map, j)&lt;/code&gt; on the left hand side of an assignment, but all I seem to get, is more confused.  :-)&lt;/p&gt;
&lt;p&gt;Another; in the conversion section, CHARACTER -&amp;gt; Integer is illegal.  How about a simple convert of '1' to 1?  More to the point, not using compile time literal syntax, but from substr or indexing.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;substr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'1234'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Don't want the character code for '2', value, but a numeric 2, computed at runtime.  Again, ASCII EBCDIC agnostic if possible.  More than willing to scan tables of suitable digits depending on base.&lt;/p&gt;
&lt;p&gt;If you don't feel like being a first level XPL student tech support question answerer here, Daniel, then that'll be ok.  ;-)&lt;/p&gt;
&lt;p&gt;Plan is to fill out some Rosetta Code entries for XPL, and I like to start with some Simple Tasks to get over the new to XPL hump.  Things like the &lt;em&gt;Sum digits of an integer (in a given base)&lt;/em&gt; task.  I'd like the solution to cover more than just the bit-string default types and conversions built into XPL.  From 2 to say base-36.&lt;/p&gt;
&lt;p&gt;Oh, and just in case you don't mind the simple minded starter questions.  One last one (for now).  Is there an idiom for terminating a counted loop early?  For example, looking to see if a character is in a map, leave when found, in a do loop counting across the length of the map. Is it simply what I think it is, a DO WHILE with &lt;code&gt;&amp;amp;&lt;/code&gt; and &lt;code&gt;|&lt;/code&gt; logical operators in the expression and explicit counting in the loop?&lt;/p&gt;
&lt;p&gt;Again, an answer of 'go read...' will be ok, Daniel. This is all currently for fun.  If things work out, the goal will be a demo of an XPL to C generated DSL, embedded in COBOL.  For now, simply for the joy of the pursuit.&lt;/p&gt;
&lt;p&gt;Have good, make well,&lt;br/&gt;
Blue&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brian Tiffin</dc:creator><pubDate>Sun, 05 Jul 2020 00:26:25 -0000</pubDate><guid>https://sourceforge.net70222263421f9851ccc6ce0bb35596387109a477</guid></item><item><title>XPL documentation</title><link>https://sourceforge.net/p/xpl-compiler/discussion/general/thread/533e10b4/?limit=25#6c70</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Here is a link to the XPL documentation for the original XPL compiler. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://teampli.net/XPL/ldindex.html" rel="nofollow"&gt;http://teampli.net/XPL/ldindex.html&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Weaver</dc:creator><pubDate>Fri, 01 Dec 2017 20:51:07 -0000</pubDate><guid>https://sourceforge.net09c46bff5b404e81cd0d0d74621697225d64ff15</guid></item><item><title>Suggestion for extension to simplify access to POSIX functions</title><link>https://sourceforge.net/p/xpl-compiler/discussion/general/thread/817af3a6/?limit=25#bfd2</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I enjoy investigating new/old languages, and have adopted a set of&lt;br/&gt;
successively more difficult commands to develop in such a languages.&lt;br/&gt;
This includes hello-world, a POSIX-like echo, a POSIX_like cat, etc.&lt;br/&gt;
I'm up to the point of writing a network program to fetch the time&lt;br/&gt;
from a remote system.  That now works, but the compilation process is&lt;br/&gt;
annoying.&lt;/p&gt;
&lt;p&gt;Since your XPL package doesn't include such network functions, my&lt;br/&gt;
method is to use forward declarations, but never to actually define them&lt;br/&gt;
as XPL procedures.  Because your XPL compiler translates to C, this&lt;br/&gt;
allows me to get at the system functions. For example,&lt;br/&gt;
    declare socket label;&lt;br/&gt;
    ...&lt;br/&gt;
    fd = socket ( ...);&lt;/p&gt;
&lt;p&gt;The problem is that the compiler (reasonably) complains above the lack&lt;br/&gt;
of such a definition, using several screen lines to complain.  This&lt;br/&gt;
obscures any "real" problems that the compiler might have diagnosed.&lt;br/&gt;
The "-W" compiler option is close, but I really do want to see&lt;br/&gt;
warnings about undeclared variables.&lt;/p&gt;
&lt;p&gt;Do you have any suggestions about a better method? What do you use?&lt;/p&gt;
&lt;p&gt;Perhaps you might consider an XPL extension of something like:&lt;br/&gt;
    &amp;lt;type&amp;gt; ::= label external&lt;br/&gt;
    &amp;lt;type&amp;gt; ::= label external &amp;lt;string constant=""&amp;gt;&lt;br/&gt;
where the "external" would signal the compiler that the procedure was&lt;br/&gt;
external, and the &amp;lt;string constant" would specify the external name of&lt;br/&gt;
the procedure to be invoked (Ada, Fortran, FreePascal ...  all behave&lt;br/&gt;
something like this).&lt;/p&gt;
&lt;p&gt;And again, thanks for releasing your XPL compiler.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Douglas Wells</dc:creator><pubDate>Mon, 27 Nov 2017 23:40:50 -0000</pubDate><guid>https://sourceforge.net1cdf08ac9ecb598510227427436b8500037f3648</guid></item></channel></rss>