Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Structure Type ... End Type
Goto page 1, 2  Next
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Various
View previous topic :: View next topic  
Author Message
Micha

Bascom Member



Joined: 03 Oct 2006
Posts: 57

germany.gif
PostPosted: Sat Jan 12, 2019 7:53 am    Post subject: Structure Type ... End Type Reply with quote

Hello

I've found out that Bascom compile without errors the following Source:

Code:
$Regfile = "m8def.dat"
$HWStack = 32
$SWStack = 32
$Framesize = 32
$Crystal = 8000000

Dim wert as Byte

Type typeName                                               ' Typ definieren
   w1 as Byte
   w2 as Word
   w3 as Integer
   w4 as Single
   w5 as Double
End Type

Dim test as typeName                                        ' Variable vom Typ typeName dimensionieren


Do

Loop


But how can I access to the new variable 'test'?

This does not work:
Code:
$Regfile = "m8def.dat"
$HWStack = 32
$SWStack = 32
$Framesize = 32
$Crystal = 8000000

Dim wert as Byte

Type typeName                                               ' Typ definieren
   w1 as Byte
   w2 as Word
   w3 as Integer
   w4 as Single
   w5 as Double
End Type

Dim test as typeName                                        ' Variable vom Typ typeName dimensionieren

test.w1 = 12                                                ' Access to var test --> Error
wert = test.w1                                              ' Access to var test --> Error


Do

Loop


How can I access to the variable?

Thanks for Info.

(BASCOM-AVR version : 2.0.8.1 )
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Sat Jan 12, 2019 11:27 am    Post subject: Reply with quote

it is not supported. If you check the help which is leading, you will not find it.
That the IDE supports it, and the compiler too, for most of it, only means that you find some future enhancement which is not ready.

_________________
Mark
Back to top
View user's profile Visit poster's website
Micha

Bascom Member



Joined: 03 Oct 2006
Posts: 57

germany.gif
PostPosted: Sat Jan 12, 2019 5:43 pm    Post subject: Reply with quote

Thanks you for quick response.
Mitch
Back to top
View user's profile
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 1161
Location: France

france.gif
PostPosted: Sun Jan 13, 2019 3:36 pm    Post subject: Reply with quote

Type typeName
w1 as Byte
w2 as Word
w3 as Integer
w4 as Single
w5 as Double
End Type


It will be Great !
Thanks Mark Wink

_________________
pleasure to learn, to teach, to create
Back to top
View user's profile Visit poster's website
krolikbest

Bascom Member



Joined: 02 Jan 2017
Posts: 112

poland.gif
PostPosted: Sun Jan 20, 2019 11:46 am    Post subject: Reply with quote

I back up it too! Smile
Back to top
View user's profile
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 2262

blank.gif
PostPosted: Sun Jan 20, 2019 12:52 pm    Post subject: Reply with quote

Would the backers also back it up with reasonable amounts of money?
It's easy to be pro something if it comes for free and someone else does all the work.

I will support this with 60USD/50EUR.
Anyone else?
Back to top
View user's profile
Climber

Bascom Member



Joined: 05 Jun 2012
Posts: 15

PostPosted: Sun Jan 20, 2019 3:48 pm    Post subject: Reply with quote

I don't even know how I can support this, because I don't know where I can transfer money.
It's funny when you buy a product and this product is always maintained for free.
I think if there was a way to transfer money easily and without much effort some people would do it.
Climber
Back to top
View user's profile
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 2262

blank.gif
PostPosted: Sun Jan 20, 2019 4:29 pm    Post subject: Reply with quote

Climber wrote:
I don't even know how I can support this, because I don't know where I can transfer money.

Ask Mark for his account, maybe he has Paypal. If you're looking for ways getting rid of money, surely you find them.
Quote:
It's funny when you buy a product and this product is always maintained for free.

Adapting this policy to cars would be a great idea. Very Happy

Microsoft would not have gotten where they are now by using such a policy.
I am all for "get more, pay more".
Back to top
View user's profile
i.dobson

Bascom Expert



Joined: 05 Jan 2006
Posts: 1570
Location: Basel, Switzerland

switzerland.gif
PostPosted: Sun Jan 20, 2019 6:21 pm    Post subject: Reply with quote

Climber wrote:
I don't even know how I can support this, because I don't know where I can transfer money.
It's funny when you buy a product and this product is always maintained for free.
I think if there was a way to transfer money easily and without much effort some people would do it.
Climber


I agree, that's why I decided to sign up/pay for a Bascom Support contract.

Regards
Ian Dobson

_________________
Walking on water and writing software to specification is easy if they're frozen.
Back to top
View user's profile
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 1161
Location: France

france.gif
PostPosted: Sun Jan 20, 2019 6:21 pm    Post subject: Reply with quote

Hi Mister MWS
Hi Mark
I agree to pay my contribution, I bought the the AVR-dos,

Why not important updates?

And Type ...end type is a real important one.

Or put it in a "pro add-on" with I2C master-slave, Avr-dos....etc..

Right for 50 €

JP Wink

_________________
pleasure to learn, to teach, to create
Back to top
View user's profile Visit poster's website
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 2262

blank.gif
PostPosted: Sun Jan 20, 2019 7:24 pm    Post subject: Reply with quote

Duval JP wrote:
I agree to pay my contribution, I bought the the AVR-dos

You bought something, you did not contribute.
If you buy an Windows OS, you do not 'contribute' with your payment, you pay and get something for your money.
This money just buys a certain version where you also get updates for.
It does not buy development of next versions, so you want to upgrade? Fine, pay for a new version.
You own an older version? Also fine, only pay an upgrade fee.
Free W10-updates are a bit different and do not exactly match the picture, because this move of MS was economical and company-political reasoned to force possibly every user to the 'newer better unified' system.
Quote:
Why not important updates?

Yes, if there's a bug in a previous version, it should be a 'warranty repair', thus free.
Quote:
And Type ...end type is a real important one.

It can be called 'extension' or 'upgrade' but not update.
I would reasonably charge for upgrades.

Users who don't want or need these upgrades, will stick with their previous version, which are still updated for known bugs.
Fresh users can buy a cheaper standard version or the latest upgraded version for an increased charge.
It would be also just and reasonable that users who constantly use the software and draw benefits out of it, pay overall a bit more with single and several smaller upgrade-charges, than the difference between the standard and upgraded version.

However, this is not my business and I'm happy not to have the burden to decide about how to charge for the efforts of development.
I only dislike the kind of demanding attitude which showed up here, gimme, gimme, gimme and best possible for free.
Back to top
View user's profile
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 1161
Location: France

france.gif
PostPosted: Mon Jan 21, 2019 3:57 pm    Post subject: Reply with quote

MWS

Yes I agree
Quote:
I only dislike the kind of demanding attitude which showed up here, gimme, gimme, gimme and best possible for free.


"For Free", "Gratis"... At the end you pay something !

Mark,
Again and again and again : Thanks you for Bascom
I explain more in the varies forum

JP

Wink

_________________
pleasure to learn, to teach, to create
Back to top
View user's profile Visit poster's website
AdrianJ

Bascom Expert



Joined: 16 Jan 2006
Posts: 2483
Location: Queensland

australia.gif
PostPosted: Mon Jan 21, 2019 11:24 pm    Post subject: Reply with quote

While I agree the the Type structure wouid be really useful, since it brings Bascom more into line with current Basic ( of various flavours ), you can do nearly the same things with the OVERLAY variation of the DIM statement.
_________________
Adrian Jansen
Computer language is a framework for creativity
Back to top
View user's profile Visit poster's website
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 2262

blank.gif
PostPosted: Tue Jan 22, 2019 9:18 am    Post subject: Reply with quote

Not much time past, but the result so far:

4 financial backers, therefrom:
1 'backs' with SLA, which is kind of an insurance, a self-purpose service used by companies to get prompt attention and special advice in case they get stuck in code or with functionality of the compiler. Paying for SLA is of selfless attitude only then, if said service will be deliberately never used, otherwise something is obtained for the payment. SLA is not thought to pay for development.
1 'backs' by buying an add-on, which allows him to use functionality he otherwise can't, but neither buys development.
1 backs with an unknown amount.
1 backs with an amount of 60 USD.

Let's assume the unknown amount to be 30 USD, it would add up to 90 USD.

Such a container variable needs extensive modifications of the compiler, as everything and every function must be able to work with.
Does anyone assume it's possible to develop and integrate such for the laughable amount of 90 USD? LOL

That's how people are, if they are not forced to give something for getting something, 100 percent are freeloaders.
And that again is only natural, because nature works this way Very Happy
Back to top
View user's profile
aphawk

Bascom Member



Joined: 23 Jan 2010
Posts: 168
Location: Brazil

brazil.gif
PostPosted: Wed Jan 23, 2019 5:40 pm    Post subject: Reply with quote

I agree with a contribution of US$ 10. Just need the Paypal acount, please send to my registered email.
With or whitout the implementatiion, I’ll be glad to contribute !

Things are not easy today at Brasil, but this money can only buy one pizza here... and I prefer to contribute with Bascom. Afterall, I had make some money thanks to Bascom for more than 5 years.

And I think that others can think the same as me ....

Paulo
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Various All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum