Mintoris Forum

Author Topic: user data types  (Read 2508 times)

Brian J

  • Newbie
  • *
  • Posts: 1
user data types
« on: Jan 09, 2013, 10:50 PM »
Hi everybody:

(Not quite array processing but related…)

I am new to Mintoris Basic really.  I bought it last summer on vacation and looked at it and quite liked it.

For PCs I have used VB (Visual Basic) for many years and there is one feature that I am very fond of using.
I didn't notice it anywhere in Mintoris Basic.
In VB6.0 it is call "user data types"
The idea is to group a collection of things together and maybe make an array of them later.
Like this…

Public type colr
  red as integer
  green as integer
  blue as integer
end type

Dim canvas(1 to 1000, 1 to 500) as colr

as another hypothetical example…

public type trade
   buy_date as integer
   buy_amount as single
   sell_date as integer
   sell_amount as single
   commission_paid as single
   profit_loss as single
end type

dim trade_history(1 to 1000) as trade

My question is, does such a facility exist in Mintoris Basic?
(turning a "record" into a user data type and then using it in arrays, etc.?)
or any plans for this?

Thanks.

Brian J.

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: user data types
« Reply #1 on: Jan 09, 2013, 11:45 PM »
Early on I decided that Basic was supposed to be as simple as possible. That's why we have one generic numeric variable type. Nothing is as simple as A = 1. I felt that the more complex data types were best left to the more involved languages like C and Java. In exchange I have added advanced array manipulation and extended string functions intending that people would rely more on text files than binary files. This version of Basic is heavily geared towards text record processing. I am also designing an addition to array syntax which would allow some amazing things.

So, I really don't want to get into that sort of data typing. I think that is where VB first departed from the hobbyist language Basic had been.
« Last Edit: Jan 09, 2013, 11:50 PM by Chuck »