Recent Posts

Pages: 1 ... 3 4 [5] 6 7 ... 10
41
Code and examples / Archimedes spiral
« Last post by Aurel on September 17, 2019, 07:13:39 AM »
in LogicBasic:

Code: [Select]
Var T Decimal, A Decimal, R Decimal, Xs Decimal, Ys Decimal
Var X0 Decimal, Y0 Decimal, X1 Decimal, Y1 Decimal

Window Res = 150, 250

T = 0.7 'starting point of spiral
A = 0.03 'increment size - spiral trail width
Xs = 125; Ys = 75
X0 = 0; Y0 = 0 'start point of line

While 1 = 1
  R = A * T
 
  X1 = R * Cos(T) * 50
  Y1 = R * Sin(T) * 50
  Straight Ys + Y0, Xs + X0, Ys + Y1, Xs + X1, Black
  X0 = X1; Y0 = Y1
  T = T + A
  Wait Events
Loop
42
Pulsar2D / Re: Is there the plan to port Pulsar2D to Haiku
« Last post by lorglas on September 16, 2019, 06:48:23 PM »
Hi, i want to compile pulsar2D on Haiku.

I get this error message. Has someone experience and could help

fpc pulsarlua.pas -Mdelphi
Free Pascal Compiler version 3.0.2 [2017/03/11] for i386
Copyright © 1993-2017 by Florian Klaempfl and others
Target OS: Haiku for i386
Compiling pulsarlua.pas
Compiling p2dvideo.pas
p2dvideo.pas(268,2) Error: Identifier not found “flip”
p2dvideo.pas(269,102) Error: Identifier not found “TSDL_RendererFlip”
p2dvideo.pas(269,120) Error: Identifier not found “flip”
p2dvideo.pas(272,2) Error: Identifier not found “flip”
p2dvideo.pas(273,102) Error: Identifier not found “TSDL_RendererFlip”
p2dvideo.pas(273,120) Error: Identifier not found “flip”
p2dvideo.pas(284,9) Error: Identifier not found “TSDL_RendererFlip”
p2dvideo.pas(284,26) Error: Error in type definition
p2dvideo.pas(300,102) Error: Identifier not found “TSDL_RendererFlip”
p2dvideo.pas(304,102) Error: Identifier not found “TSDL_RendererFlip”
p2dvideo.pas(1252) Fatal: There were 10 errors compiling module, stopping
Fatal: Compilation aborted
Error: /boot/home/config/non-packaged/bin/ppc386 returned an error exitcode

regards lorglas
43
Community news and announcements / Re: "New" retro computer
« Last post by Cybermonkey on September 13, 2019, 07:51:38 AM »
Part 2 of David Murray's Dream Computer is online:



Awesome work!
44
Code and examples / Re: Multiplication with all decimal digits
« Last post by B+ on September 10, 2019, 02:47:45 AM »
Just 5 digit * 5 digit = 10 digit
Quote
93471 * 94215 = 8806370265
 93462 * 93576 = 8745800112
 93408 * 93702 = 8752516416
 93402 * 93708 = 8752514616
 93352 * 94006 = 8775648112
 93252 * 95163 = 8874140076
 93237 * 94566 = 8817050142
 93205 * 94603 = 8817472615
 93175 * 94732 = 8826654100
 93157 * 93418 = 8702540626
 93126 * 95145 = 8860473270
 93103 * 95074 = 8851674622
 93072 * 95127 = 8853660144
 93052 * 93514 = 8701664728
 93048 * 94215 = 8766517320
 93046 * 94375 = 8781216250
 93025 * 94234 = 8766117850
 93016 * 95314 = 8865727024
 92853 * 94410 = 8766251730
 92802 * 94353 = 8756147106
 92785 * 93304 = 8657211640
 92772 * 95013 = 8814546036
 92764 * 94180 = 8736513520
 92764 * 95134 = 8825010376
 92730 * 93417 = 8662558410

...
 10567 * 99634 = 1052832478
 10566 * 97443 = 1029582738
 10564 * 98377 = 1039254628
 10557 * 98478 = 1039632246
 10542 * 99258 = 1046377836
 10482 * 97653 = 1023598746
 10479 * 98556 = 1032768324
 10456 * 99223 = 1037475688
 10452 * 99267 = 1037538684
 10435 * 98479 = 1027628365
 10372 * 99748 = 1034586256
 10359 * 98874 = 1024235766  item# 39712
45
Code and examples / Re: Multiplication with all decimal digits
« Last post by B+ on September 08, 2019, 01:22:20 PM »
I killed the program after running it for about 20 hours.

At item #186,110
321 * 4069875 = 1306429875   kinda neat how last 3 digits match.

I was running it back from multiplying  two 5 digit numbers and I realized it would take days to get through double and single digit numbers.

Ha! I originally thought maybe DIM an array to store 500 or so.    :P
46
Code and examples / Re: Multiplication with all decimal digits
« Last post by B+ on September 07, 2019, 06:13:01 PM »
I am running an all digits Twice program, past 2 hours now, anyone want to guess how many of those there are?
47
Code and examples / Re: Multiplication with all decimal digits
« Last post by Aurel on September 06, 2019, 11:36:25 AM »
funny commands
EXPLODE()
AMOUNT()

 :)
48
Code and examples / Re: Multiplication with all decimal digits
« Last post by Peter on September 05, 2019, 08:04:30 PM »
Interesting challenge, in BaCon it can be done with delimited strings.

Code: [Select]
FOR x = 1 TO 99
    FOR y = 1 TO 9999
        str$ = EXPLODE$(STR$(x) & STR$(y) & STR$(x*y), 1)
        IF AMOUNT(str$) = 10 AND AMOUNT(UNIQ$(str$)) = 10 THEN PRINT x, "*", y, "=", x*y
    NEXT
NEXT

Output:

Quote
3*5694=17082
3*6819=20457
3*6918=20754
3*8169=24507
3*9168=27504
4*3907=15628
4*7039=28156
4*9127=36508
6*5817=34902
7*3094=21658
7*4093=28651
7*9304=65128
7*9403=65821
27*594=16038
36*495=17820
39*402=15678
45*396=17820
46*715=32890
52*367=19084
54*297=16038
63*927=58401
78*345=26910
49
Code and examples / Re: Multiplication with all decimal digits
« Last post by Aurel on September 05, 2019, 01:03:09 PM »
Thanks Galileo
 :)




50
Code and examples / Re: Multiplication with all decimal digits
« Last post by Galileo on August 31, 2019, 06:07:40 PM »
Pages: 1 ... 3 4 [5] 6 7 ... 10