Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Hotkey for "Proper Indent"

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
Alexander-Dan

Bascom Member



Joined: 13 Mar 2014
Posts: 63
Location: Bryansk - Russia

russia.gif
PostPosted: Thu Apr 16, 2020 11:18 am    Post subject: Hotkey for "Proper Indent" Reply with quote

Request: add a hotkey "Proper Indent" to the editor.
desirable for the left hand.

Is that possible, Mark? Embarassed



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

Administrator



Joined: 09 Apr 2004
Posts: 5069
Location: Holland

blank.gif
PostPosted: Tue Apr 21, 2020 8:38 am    Post subject: Reply with quote

sure, no problem, but as 2083 is ready, it will be in 2084.
write an email to support (after the 2083 release) and i will get you a beta.

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

Bascom Member



Joined: 15 Dec 2007
Posts: 489
Location: Cleveland, OH

usa.gif
PostPosted: Tue Apr 21, 2020 3:18 pm    Post subject: Reply with quote

Glad to hear the next version is up and coming, I always look forward to seeing what's new!

Interestingly, just yesterday I came across two "needs":

1) I really needed an 8 Byte Integer data type for a sensor interface.
Lots of big numbers in the (many!) intermediate calculations.
The sensor's vendor's algo was all in integer math.
I ended up using Double Type for parts of the calculations and things worked out fine.

2) Related to that I noted that the Shift instruction works on many variable types, but not on DWords.
That had an easy workaround, with just reading and assigning Bit values, (perhaps not the "best" way to do this, but it easy and fast to code).
It just caught my eye.

3) Lots of new chips to consider... AVR64DA128, and the new Tiny-O series!

Looking forward to the release!

JC
Back to top
View user's profile Visit poster's website
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 1827

blank.gif
PostPosted: Tue Apr 21, 2020 6:30 pm    Post subject: Reply with quote

JC wrote:
2) Related to that I noted that the Shift instruction works on many variable types, but not on DWords.
That had an easy workaround, with just reading and assigning Bit values, (perhaps not the "best" way to do this, but it easy and fast to code).

How comes that you can not express such a simple issue exactly?
First, your statement is wrong, Shift works on a DWord - DWord is a unsigned 4 byte integer - exactly as expected.

Only the Shift's 'signed'-option does not work, neither it works on a DWord nor on a Long.
Insofar your method of throwing out nonsense like a bone to a dog was not completely useless, the dog actually found some.
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5069
Location: Holland

blank.gif
PostPosted: Tue Apr 21, 2020 7:25 pm    Post subject: Reply with quote

please all : take care what this topic is about. if there is need to discuss other things, open a new topic.
_________________
Mark
Back to top
View user's profile Visit poster's website
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 1827

blank.gif
PostPosted: Tue Apr 21, 2020 10:43 pm    Post subject: Reply with quote

albertsm wrote:
please all : take care what this topic is about. if there is need to discuss other things, open a new topic.

If someone writes, 'Oh, btw. I've found some error in the spacetime constant, but it was a simple fix", while it was merely a misinterpretation of the bus timetable, it spikes surely my interest.
I apologize for any Pavlovian reflex posting Very Happy

There is actually a real bug if Shift is used with argument 'signed' and a long or dword, bit 31 is not saved then, this seems not worth a new topic.

Consider also that the TO posed a request and the request was granted by you, which means: end of story, victory, fini, mission accomplished, finito.
A bit offtopic really does not hurt his request or thread.
Back to top
View user's profile
JC

Bascom Member



Joined: 15 Dec 2007
Posts: 489
Location: Cleveland, OH

usa.gif
PostPosted: Wed Apr 22, 2020 3:03 am    Post subject: Reply with quote

Sorry, I, too, thought the OP's question was answered, and this was somewhat on topic, somewhat off topic.

Quote:
First, your statement is wrong, Shift works on a DWord - DWord is a unsigned 4 byte integer - exactly as expected.


I guess I should have check...

The Help states that it works for: "Byte, Integer/Word, Long, or Single variable"

I wanted to use it on a DWord type, and since five other data types were mentioned, but not the one I wanted, I didn't bother even trying the instruction.
I just used an alternative approach.

Next time I'll be more through in my testing, and provide an example, before I make such a statement.
Obviously had I done so it would have revealed that the compiler can handle it.

My mistake.

JC
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
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