Recent Posts

Pages: 1 ... 4 5 [6] 7 8 ... 10
51
Code Repository / Re: 2048 Challenge
« Last post by John on July 11, 2023, 07:34:37 PM »
This is a VB6 version I found. I had to replace the StatusBar with a Label to get it to compile. StatusBar doesn't seem to be a valid common control in later updates of the library.

2048 Repository

52
Code Repository / Re: 2048 Challenge
« Last post by John on July 10, 2023, 10:00:23 AM »
Hi Jalih,

Glad you are still with us.

I'm thinking on submitting an entry using a VB6 OCX and ScriptBasic. This would show how to use VB as a UI component.
53
Code Repository / Re: 2048 Challenge
« Last post by jalih on July 10, 2023, 07:44:23 AM »
I just started writing a version of 2048 using the 8th programming language. I got it figured out how to make blocks slide nicely when moving. I still need to add movement for up and down but that should be simple addition. Also texts should be centered inside block rectangles and visual look still needs some work.

2048 game for 8th
54
Phix / Re: Phix Introduction
« Last post by John on July 07, 2023, 06:01:01 PM »
Maintaining a BASIC can bring much joy.
55
Phix / Re: Phix Introduction
« Last post by Gemino Smothers on July 07, 2023, 09:36:30 AM »
Phix looks like a great alternative to Java or Python.

I see Phix daily as I work on Rosetta Code tasks. It's one of the simpler to read languages there and has helped me to understand/translate tasks as I look through various languages.

It's cool to see the author here in the BASIC community!
56
Interpreters / Craft Basic
« Last post by Gemino Smothers on July 07, 2023, 09:15:43 AM »
I was shy to post my work here, but I am more confident that it might be worth looking at now.

Several times throughout my years, I tried to write an expression evaluator and never had any success. About 8 months ago, I really pushed hard to get something done and came up with something using RPN. I made a calculator and BASIC interpreter.

These programs were initially written in QuickBasic. I am still updating them.

Tiny Craft Basic Interpreter written in QuickBasic: https://www.lucidapogee.com/forum/viewtopic.php?t=4

RPN Calc written in QuickBasic: https://www.lucidapogee.com/forum/viewtopic.php?t=28

Tiny Craft Basic is meant to be a simple line mode basic with the more minimal set of features. RPN Calc tries to be a scientific command line calculator.

Since then, I have also been developing Craft Basic for Windows or just Craft Basic. It's a direct interpreter like its line mode sibling. Written in Emergence Basic.

Craft Basic really just tries to be a minimal tiny BASIC with some bonus features including graphics and forms.

Craft Basic for Windows: https://www.lucidapogee.com/index.php?page=craftbasic

What's cool about this language is that everything you need is packed into one exe. All the other files are just for support. The language still works if all the other files are lost. Also, the syntax while limited is very easy to pick up.

One of the biggest limits is the lack of string support (I will be adding it in a future version release).

Some neat language features include the ability to use expressions with all FOR loop parameters including the step. DO/LOOP/LOOPWHILE/LOOPUNTIL is supported. BREAK works with FOR and DO loops. You may nest IF and ELSE. (although there's no ELSEIF or SELECT CASE)

I test my language with Rosetta Code tasks. There's already over 60 tasks complete. https://rosettacode.org/wiki/Category:Craft_Basic

Here's a preview of some Craft Basic code:
Code: [Select]
'https://rosettacode.org/wiki/Ultra_useful_primes

for n = 1 to 10

let k = -1

do

let k = k + 2
wait

loop prime(2 ^ (2 ^ n) - k) = 0

print "n = ", n, " k = ", k

next n

Code: [Select]
'https://rosettacode.org/wiki/Attractive_numbers

for x = 1 to 120

let n = x
let c = 0

do

if int(n mod 2) = 0 then

let n = int(n / 2)
let c = c + 1

endif

wait

loop int(n mod 2) = 0

for i = 3 to sqrt(n) step 2

do

if int(n mod i) = 0 then

let n = int(n / i)
let c = c + 1

endif

wait

loop int(n mod i) = 0

next i

if n > 2 then

let c = c + 1

endif

if prime(c) then

print x, " ",

endif

next x

Code: [Select]
'https://rosettacode.org/wiki/Draw_a_sphere

let j = 2

for i = 221 to 0 step j * -1

for k = -3.14 to 3.14 step .01

dot 221 + i * sin(k), 222 + 221 * cos(k)
dot 221 + 221 * sin(k), 222 + (i - 1) * cos(k)

wait

next k

let j = j + 1

next i
57
Off Topic / Re: BASIC Top 5
« Last post by John on June 28, 2023, 10:36:54 PM »
That may work for DOS / Windows but Linux has standardized on 64 bit.
58
Off Topic / Re: BASIC Top 5
« Last post by Gemino Smothers on June 28, 2023, 09:38:39 PM »
I plan to continue using 8/16/32 bit long well before I ever transition to 64.
Maybe I should give Power Basic a try some day.
59
Off Topic / Re: BASIC Top 5
« Last post by John on June 07, 2023, 05:01:42 PM »
I don't see PowerBasic ever being updated again. It was a Zale kludge of DOS / 16 & 32 bit Windows. Only he knew how to build a release and took it with him to the grave.

I wonder what ever happened to Jim the author of HotBasic?
60
Off Topic / Re: BASIC Top 5
« Last post by AIR on June 05, 2023, 07:10:42 PM »
  • BCX/MBC because you can use C/C++ headers directly with no conversion
  • Purebasic because it's cross platform
  • Hotbasic - very underrated and mostly unknown, but after all the work I put in getting this ported to Linux of course I'm gonna add it.  Unfortunately no updates since 2012.
  • Powerbasic - Personally don't care for it, but very powerful if you're good with WinAPI.
The last 3 are paid software, btw.

AIR.
Pages: 1 ... 4 5 [6] 7 8 ... 10