Re: [Oorexx-devel] Ad loop counter on do...over ?
> > number a do with over a table where the indices are not numbers, or over > a set or bag > Use do with index i item j over c~allItems ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel
Re: [Oorexx-devel] Ad loop counter on do...over ?
On Tue, 19 Feb 2019, at 18:01, Rony G. Flatscher wrote: > do idx over dir counter i >say "entry #" i": idx="idx "dir[idx]="dir > end > > > where "counter" would be a subkeyword defining a loop variable which > starts out with "1" and gets increased by one after each loop. It seems to me that it would be more useful, if you offered two options do idx over dir firstcount i say "entry #" i": idx="idx "dir[idx]="dir end and do idx over dir finalcount i say "entry #" i": idx="idx "dir[idx]="dir end where 'firstcount' is incremented as if the first statement in the loop was i=i+1, and 'finalcount' happened as if it was the final statement. Then an 'iterate' within the loop would have no effect on a firstcount counter, but would prevent incrementing of a finalcount one. Maybe you could even have do idx over dir firstcount i finalcount j say... end which would be equivalent to i=0;j=0 do idx over dir i=i+1 say... j=j+1 end -- Jeremy Nicoll - my opinions are my own. ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel
[Oorexx-devel] Also, CMakeList.txt same thing or me, tried to override?
290 # current trunk uses the C++ "override" keyword, which requires C++11 291 if (CMAKE_VERSION VERSION_LESS "3.1") 292 if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") 293 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") 294 endif () 295 else () 296 set (CMAKE_CXX_STANDARD 11) 297 endif () 298 299 # Set compiler and linker flags common to all build environments 300 # current trunk uses the C++ "override" keyword, which requires C++11 301 if (CMAKE_VERSION VERSION_LESS "3.1") 302 if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") 303 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") 304 endif () 305 else () 306 set (CMAKE_CXX_STANDARD 11) 307 endif () ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel
Re: [Oorexx-devel] Ad loop counter on do...over ?
Erich: How would you number a do with over a table where the indices are not numbers, or over a set or bag where the items are not numbers, etc.? —-rony Rony G. Flatscher (mobil/e) > Am 19.02.2019 um 23:15 schrieb Erich Steinböck : > > That's exactly what you can do using the DO WITH syntax > ___ > Oorexx-devel mailing list > Oorexx-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/oorexx-devel ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel
Re: [Oorexx-devel] Ad loop counter on do...over ?
That's exactly what you can do using the DO WITH syntax ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel
Re: [Oorexx-devel] Ad loop counter on do...over ?
Greetings Rony, Rony G Flatscher wrote: yes. It is about the beed to number the output while doing a do...over beginning with the number 1 (a numbered list). The old issue that using the do/over syntax, not being able to specify a starting index, correct? Whereas alternate syntax calling out a starting value is not compatible with the over keyword? I am thankful, -- Michael Lueck Lueck Data Systems http://www.lueckdatasystems.com/ ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel
Re: [Oorexx-devel] Ad loop counter on do...over ?
Erich, yes. It is about the beed to number the output while doing a do...over beginning wirh the number 1 (a numbered list). Cheers —-rony Rony G. Flatscher (mobil/e) > Am 19.02.2019 um 21:09 schrieb Erich Steinböck : > > Rony, > are you aware of the new `DO WITH INDEX i ITEM j OVER collection` syntax? > ___ > Oorexx-devel mailing list > Oorexx-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/oorexx-devel ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel
Re: [Oorexx-devel] After rework is this line still needed
Hi Jason, I've just removed the define with [r11788] Thanks for reporting! ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel
Re: [Oorexx-devel] Ad loop counter on do...over ?
Rony, are you aware of the new `DO WITH INDEX *i* ITEM *j* OVER *collection*` syntax? ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel
[Oorexx-devel] After rework is this line still needed
./interpreter/platform/unix/SysRexxUtil.cpp:200:#define MAX256 /* temporary buffer length*/ I get warning on Haiku about MAX being redifined but see no place it used. ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel
[Oorexx-devel] Ad loop counter on do...over ?
Quite often, when using "do...over" there is a need for having a counter that increases automatically on each loop. Currently one needs to use a separate variable that gets explicitly increased within the loop, e.g.: i=1 do idx over dir say "entry #" i": idx="idx "dir[idx]="dir i=i+1 end It would be great if one could use optionally a counter in the do...over case as well, something like: do idx over dir counter i say "entry #" i": idx="idx "dir[idx]="dir end where "counter" would be a subkeyword defining a loop variable which starts out with "1" and gets increased by one after each loop. ---rony ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel
Re: [Oorexx-devel] DARWIN build issue
Hello Rick Here is the modified function /** * test if an individual file is a case sensitive name * * @return For Unix systems, always returns true. For MacOS, * this needs to be determined on a case-by-case basis. */ bool SysFileSystem::isCaseSensitive(const char *name) { #ifndef HAVE_PC_CASE_SENSITIVE return true; #else char *tmp = strdup(name); size_t len; while ( !SysFileSystem::exists(tmp) ) { len = strlen(tmp); // scan backwards to find the previous directory delimiter for (; len > 0; len --) { // is this the directory delimiter? if (tmp[len] == '/') { tmp[len] = '\0'; break; } } // ugly hack . . . to preserve the "/" if ( len == 0 ) tmp[len+1] = '\0'; } // at this point the tmp variable contains something that exists long res = pathconf(tmp, _PC_CASE_SENSITIVE); free(tmp) ; if (res != -1) { return (res == 1); } // non-determined, just return true return true; #endif } There is a spelling glitch in config.h.i.cmake , the good one is /* Define to 1 if _PC_CASE_SENSITIVE is a valid value */ #cmakedefine HAVE_PC_CASE_SENSITIVE E > On 19 Feb 2019, at 13:23, Rick McGuire wrote: > > did what you suggested, but wouldn't performing the check on the directory > the file is in give a more accurate result? ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel
Re: [Oorexx-devel] DARWIN build issue
Good Idea… I will run a few tests and let You know But … the backtracking to an existing directory might be murky E > On 19 Feb 2019, at 13:23, Rick McGuire wrote: > > I did what you suggested, but wouldn't performing the check on the directory > the file is in give a more accurate result? > ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel
Re: [Oorexx-devel] DARWIN build issue
On Mon, Feb 18, 2019 at 4:10 PM Enrico Sorichetti via Oorexx-devel < oorexx-devel@lists.sourceforge.net> wrote: > Here is the tested and WORKING code sequence > IIRC I had to fix the testSuite in a couple of places > > I did run the test suite twice , > once on the boot volume ( case insensitive by default ) > The second time on an external disk with a case sensitive file system > > > Pathconf needs the file or directory to exist > > Darwin case sensitiveness applies to each file system > So in case of file not found it will return the system case sensitiveness > I did what you suggested, but wouldn't performing the check on the directory the file is in give a more accurate result? Rick > > On NOT Darwin systems it will just cost one extra call , > If You are trying to squeeze performance to the last bit > The second call could be #ifdeffed , > > Cheers > E > > > > /** > * indicate whether the file system is case sensitive. > * > * @return For Unix systems, always returns true. For MacOS, > * this needs to be determined on a case-by-case basis. > * This returns the information for the root file system > */ > bool SysFileSystem::isCaseSensitive() > { > #ifdef HAVE_PC_CASE_SENSITIVE > long res = pathconf("/", _PC_CASE_SENSITIVE); > if (res != -1) > { > return (res==1); > } > #endif > // any error means this value is not supported for this file system > // so the result is most likely true (unix standard) > return true; > } > > /** > * test if an individual file is a case sensitive name > * > * @return For Unix systems, always returns true. For MacOS, > * this needs to be determined on a case-by-case basis. > */ > bool SysFileSystem::isCaseSensitive(const char *name) > { > #ifdef HAVE_PC_CASE_SENSITIVE > long res = pathconf(name, _PC_CASE_SENSITIVE); > if (res != -1) > { > return (res==1) ; > } > // probably file not found > // returns the information for the root file system > res = pathconf("/", _PC_CASE_SENSITIVE); > if (res != -1) > { > return (res==1) ; > } > #endif > // any error means this the value is not supported for this file system > // so the result is most likely true (unix standard) > return true; > } > > > > > On 18 Feb 2019, at 21:52, Erich Steinböck > wrote: > > PC_CASE_SENSITIVE > > > ___ > Oorexx-devel mailing list > Oorexx-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel