March 29, 2024, 02:03:37 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Put in your request

Started by Rock Ridge Farm (Larry), March 10, 2010, 06:34:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LarryMc

Quote from: RitchieF on March 13, 2010, 10:33:13 AM
Larry,

could be a nice feature for the Visual Designer, too

Richard
I added to my list of things to look into later.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Ficko

Last time I programmed in some Basic interpreter â€ââ,¬Å" I think QBasic â€ââ,¬Å" was about 25 years ago but I still inclined to write such things some times as
â€Ã...¾FOR A = 0 TO 2*PI STEP .02â€Ã...“and of course getting an error which irritates me.  ;D

Shrike

Quote from: billhsln on March 13, 2010, 08:09:56 AM
It might also be nice if the Lexer handled "\\" correctly.
This is all I want. :)

peterpuk

Maybe a few print commands that can make printing easier.
Peter

Ionic Wind Support Team

Quote from: Shrike on March 15, 2010, 05:02:45 PM
Quote from: billhsln on March 13, 2010, 08:09:56 AM
It might also be nice if the Lexer handled "\\" correctly.
This is all I want. :)

Not sure what you mean by that, could you clarify?.  \ is an escape sequence to the lexer, just as it is in other mainstream compilers.  It is in the docs, but maybe not clear enough. 

\\ = \
\t = tab
\n = newline
\xnn = hexadecimal constant, so you can embed things in strings like \x0C

Paul.
Ionic Wind Support Team

billhsln

What I mean is that when you enter:

value1 = "\\"
value2 = "Test"

"Test" will be in displayed in the "String Color", where "\\" will be in the "Text Color", where it should be in "String Color".

Bill
When all else fails, get a bigger hammer.

Ionic Wind Support Team

Ahhh...  you mean Scintilla's lexer, not Emergence's compiler lexer.

Ionic Wind Support Team

billhsln

Sorry, I did not know the difference.

Bill
When all else fails, get a bigger hammer.

ckoehn

An error trapping routine would be nice.  Like an ON ERROR RESUME NEXT or ON ERROR GOTO.  It would keep your program from crashing on some hidden bugs.  Then have an ERRORSTRING or something like that.  :)

Guilect


Hi,
for future releases here are a few suggestions to consider to make IWBasic even better:

Static Local Variables (like Aurora has)

An IDE that can run from a memory stick (thumb drive).

64 - bit

The option of using controls in an OOP fashion:
e.g.  Dim myButton as cButton
myButton.width = 50
myButton.text = "Press Me"

IDE with Intellisense (along with the existing autocomplete)

A built in Browse for Folder function

Enums that can be negative:
e.g.

ENUM  foo
   bar = -1
   cat = -2
   dog = -3
ENDENUM


Regards.

Logman

January 28, 2011, 12:32:07 PM #35 Last Edit: January 28, 2011, 12:33:53 PM by Logman
Larry/Sapero:

I'm really looking forward to version 2.0 to be released.

In the meantime, I just realized as I'm coding a program for a customer that there are a couple of important capabilities that are missing in which I've had to work around.

One missing item is dynamic arrays. I haven't had a need to redim arrays until today and really miss this capability in IWBasic.

Another is the ability to declare static variables within subroutines:



OPENCONSOLE
DEF result as INT

sub doSomething(a as int, b as int), int
static var as int

   some code here...
   var = var * (a + b)

return var
endsub

result = doSomething(5,10)
print result

DO:UNTIL INKEY$ <> ""
CLOSECONSOLE
END


Two other commands I miss are createThread (releaseThread, resumeThread, pauseThread, etc.) and createMutex (lockMutex, releaseMutex, etc.). Up to now, I've had to put my own thread and mutex code together using the API, but most other BASICs have added these commands and I think they would make life a whole lot easier on us if IWBasic included them also.

I'm not complaining, you are doing great work. It's just that these additional commands would bring the language to the point where it would match today's high-tech requirements and customer requests given all the new capabilities of today's microprocessors.

Just a thought. :)

Logman
Education is what you get when you read the fine print.<br />Experience is what you get when you don't!

LarryMc

January 28, 2011, 12:40:00 PM #36 Last Edit: January 28, 2011, 12:44:46 PM by LarryMc
Read starting here http://ebasic-aurora.com/forums/index.php?topic=4100.msg32480#msg32480 for the discussion about redim arrays.

read here http://ebasic-aurora.com/forums/index.php?topic=4100.msg32592#msg32592 for the announcement that STATIC has been added

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Logman

Larry:

You are right. I read through these updates as Sapero writes them, but I must have missed the part about static variables. Glad they are being added--really nice.

Logman
Education is what you get when you read the fine print.<br />Experience is what you get when you don't!

Logman

Most BASICs have a simple REDIM capability like the following that don't require a convoluted set of work-around instructions:



Dim MyArray[2] as INT
  MyArray[0] = 0
  MyArray[1] = 1

ReDim MyArray[4]
  MyArray[2] = 2
  MyArray[3] = 3

ReDim MyArray[4]=0



ReDim MyArray[4] saves the contents of the previous array whereas ReDim MyArray[4]=0 destroys all contents of the previous array.

Logman
Education is what you get when you read the fine print.<br />Experience is what you get when you don't!

Logman

One other capability that would be extremely handy would be SELECT/CASE statements that could handle multiple tests on the same line.

For instance:



DEF name[10] as ISTRING
DEF strLen, i as INT

name = "Lastname"
strLen = LEN(name)

FOR i = 0 to strLen
  SELECT name[i]
    CASE >="A" and <="Z"
      do something code...
    CASE >="a" and <="z"
      do something code...
    CASE >="0" and <="9"
      do something code...
    DEFAULT
      do something code...
  ENDSELCT
NEXT i



This would be extremely handy in parsing text and so forth. Right now, this can't be done using the CASE/CASE& combination.

Logman
Education is what you get when you read the fine print.<br />Experience is what you get when you don't!

sapero

Select-Case block internally works like a set of If-Then, the value of Select is compared with all Case values.
If you put TRUE to Select, the first Case which is True will be eecuted:

select true
'  case X -> expression X must evaluate to TRUE (strict number 1) or anything else (0, 2, 3, 4 ...).
   case name[i]>="A" and name[i]<="Z"

LarryMc

DEF name[10] as ISTRING
DEF strLen, i as INT

name = "Lastname"
strLen = LEN(name)

FOR i = 0 to strLen
  SELECT 1
    CASE name[i] >="A" and name[i] <="Z"
      do something code...
    CASE name[i] >="a" and name[i] <="z"
      do something code...
    CASE  name[i] >="0" and name[i] <="9"
      do something code...
    DEFAULT
      do something code...
  ENDSELCT
NEXT i


LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Logman

Ah so. I was attempting to follow the example in the manual on page 61. It depicts parentheses around the expression and this wasn't working:



SELECT TRUE
    CASE (Choice > 10)
        PRINT "Number is greater than 10"
    CASE (Choice < 10)
        PRINT "Number is less than 10"
ENDSELECT



But, the following code does in fact work:



'Test code...
j = 0
FOR i = 0 to strLen
SELECT true
CASE iText[i] >= "A" and iText[i] <= "Z"
iWord[j] = iText[i]
j=j+1
CASE iText[i] >= "a" and iText[i] <= "z"
iWord[j] = iText[i]
j=j+1
CASE iText[i] >= "0" and iText[i] <= "9"
iWord[j] = iText[i]
j=j+1
DEFAULT iText[i] = " "
dArray[k]=iWord
ENDSELECT
NEXT i



Amazing, thanks Larry & Sapero. :)

Logman
Education is what you get when you read the fine print.<br />Experience is what you get when you don't!

LarryMc

Works fine with parentheses for me
I tried 9,10,11
int choice = 10
SELECT TRUE
    CASE (Choice > 10)
        PRINT "Number is greater than 10"
    CASE (Choice < 10)
        PRINT "Number is less than 10"
    default
        PRINT "Number is ",choice
ENDSELECT

you didn't test your code with 10 by any chance did you?
your posted code didn't address choice being 10; mine does.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

barry

I was just toying around with some simple 3D programming.  I know very little about 3D programming so I initially got the 3D pack with whichever Pixia version it came with to try to learn it; but alas, almost no documenentation.  The current version is the same, of course.

I realize it's way too late to do anything about that so what I'd like to suggest is that the new version include some serious 3D documentation.

And yes, I know that there are going to be 40 million reasons to put that off to the future.  While it's true that tomorrow never comes, 3D documentation should.

I've said before (probably far too many times) that I think documentation is one of the weakest areas in IWBasic and I'm pretty sure you guys know that and are doing some things about it.  I really hope 3D docs will be a serious part of that.

Barry