<div dir="ltr"><div><div><div>I had wondered why you insisted on putting byval everywhere!<br><br></div>Yes, all scalar types (integers, enums and pointers) are byval, while strings and UDTs are byref by default.<br></div>In -lang deprecated and -lang qb everything defaults to byref (though I had to look that up; I hardly remember it). I do remember that we had to add explicit byval and byref to everything in order to gradually switch to -lang fb, since we needed to figure out which arguments needed to be explicitly tagged byref for -lang fb. Since making the switch, the byvals all became redundant.</div><div>But do be careful, there are a very few udts or strings intentionally passed byval. That's another reason to not put byval and byref everywhere: it's better to only write it in exceptional cases to draw attention to it.<br></div><div>Also, lately I have been writing "byref X as string" to indicated a UDT or string argument that gets modified, and "X as string" to indicate one that doesn't.</div><div><br></div><div>Also, I think "byval as string" used to be broken, but it works now.<br></div><div><br></div>But as another datapoint, "-w pedantic" makes fbc throw a warning if byval or byref isn't given, and fbc itself uses that when compiling.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 8 November 2017 at 04:44, James Paige <span dir="ltr"><<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Are integers byval by default?<br><br></div>Maybe I am thinking of -lang deprecated where they were byref by default<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 7, 2017 at 7:38 AM,  <span dir="ltr"><<a href="mailto:subversion@hamsterrepublic.com" target="_blank">subversion@hamsterrepublic.<wbr>com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">teeemcee<br>
2017-11-07 07:38:16 -0800 (Tue, 07 Nov 2017)<br>
739<br>
Remove all redundant byval's from allmodex. Also always capitalise Frame and Palette16<br>
<br>
Which of the following is more readable?<br>
  DECLARE SUB drawmap OVERLOAD (tmap as TileMap, byval x as integer, byval y as integer, byval tilesetsprite as Frame ptr, byval p as integer, byval trans as bool = NO, byval overheadmode as integer = 0, byval pmapptr as TileMap ptr = NULL, byval ystart as integer = 0, byval yheight as integer = -1, byval largetileset as bool = NO)<br>
or<br>
  DECLARE SUB drawmap OVERLOAD (tmap as TileMap, x as integer, y as integer, tilesetsprite as Frame ptr, p as integer, trans as bool = NO, overheadmode as integer = 0, pmapptr as TileMap ptr = NULL, ystart as integer = 0, yheight as integer = -1, largetileset as bool = NO)<br>
---<br>
U   wip/allmodex.bas<br>
U   wip/<a href="http://allmodex.bi" rel="noreferrer" target="_blank">allmodex.bi</a><br>
______________________________<wbr>_________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.o<wbr>rg</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org<wbr>/listinfo.cgi/ohrrpgce-motherh<wbr>amster.org</a><br>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org">ohrrpgce@lists.motherhamster.<wbr>org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.<wbr>org/listinfo.cgi/ohrrpgce-<wbr>motherhamster.org</a><br>
<br></blockquote></div><br></div>