screenres 640,480,32randomize()dim as single parent(99),parentcost=1!/0!for i as long=0 to ubound(parent):parent(i)=2*rnd()-1:nextdim as mutator mutmut.init(20,15!)do mut.mutate(parent()) dim as single cost=test(parent()) if cost<parentcost then parentcost=cost cls line (320+200*parent(0),240+200*parent(1))-(320+200*parent(2),240+200*parent(3)) for i as ulong=4 to ubound(parent) step 2 line -(320+200*parent(i),240+200*parent(i+1)) next print parentcost else mut.undo(parent()) end if

Did a Compile and Quick Run - Screenres opened and shortly after the code closed. Before publishing code, it is worthwhile to do a final compile and run just to make sure an edit has not screwed things up.

A few views before mine and not a word. I suppose it is possible that without an explanation folk went back a page and moved on which is a pity because you have obviously put a fair amount of work into your code.

I didn't put any work into it. Maybe this business between 32 and 64 bit systems again. Who knows.Anyway on my computer it does some mutations, sees if that makes an improvement, if not undoes. I need to decide an optimizer for something I'm doing. I'm not very happy with the code anyway, also I think the built in FB RNG would suffice for it.

You can't expect people to maintain 2 systems and two compilers before they post some code. If you want to loosen up maybe the Dandy Warhols are a good band to listen to. Or is it roast beef, Yorkshire pudding and oxo every Sunday.

sean_vn wrote:You can't expect people to maintain 2 systems and two compilers before they post some code.

You can expect people who post here in the Tips & Tricks section that they compile their code at least with standard Gas, Gcc32 and Gcc64. It's only a mouseclick or a keystroke away, right?

People who come here are mostly n00bs, and if they see code crash with an exception, as does happen with your code, that throws a really bad light on the language FreeBasic. That's why the administrators of this forum imposed that rule. So, please relax, fix your code, add an explanation and some comments (good practice anyway), and all will be fine.

I am from Yorkshire and "roast beef, Yorkshire pudding and oxo every Sunday" is not my idea of loosening up. On the other hand this is. Twenty minutes of that, with a decent volume, is the polar opposite to a twenty-minute cardiovascular workout on an exercise bike and brings blood pressure down like a stone.

I was just starting to get back to coding after a break. This forum got very unfriendly very quick. Maybe Brexit is causing a general increase in grumpiness and a lack of movement. Maybe a chia seed and prune juice pudding would help? if not consult your doctor.While not an OAP like some of you guys, I am getting along a bit. I should really be using modern languages like python and javascript.The problem is I tend not to get a lot done in those languages. Then there is a tension between getting at least something done with FB and doing what I should be doing with modern languages.

Here is the post that has been alluded to. Since you have been away, you should know that there has been tension in forums. Enough so that a moderator has been brought on to aid in administering the forum. Here is that forum topic. I have to admit that the first thing I thought when I saw the title was "what is this code about?". And then disappointment when it was code with no explanation. I am not the moderator nor am I chastising. I recommend that you can avoid the tension by one or two lines explaining at least what the code is doing. And then posting "Tested on 32bits only". This makes your post more "friendly".

In sancho3's first link the thread terminates with "Shouldn't this topic be a sticky one (always on top)?" by badidea. Personally, I think that is a brilliant idea but only for counting_pine's opening post. <smile>