Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 19, 2024, 09:41:21 09:41


Login with username, password and session length


Pages: [1]
Print
Author Topic: Array Of Float  (Read 3728 times)
0 Members and 1 Guest are viewing this topic.
KhaledLotfy
Junior Member
**
 Muted
Offline Offline

Posts: 39

Thank You
-Given: 19
-Receive: 8


« on: June 09, 2008, 06:04:57 18:04 »

Hi All;
do any one have an idea how to implement an array of type float in Proton compilier;
Regards
Khaled
Logged
strat
Newbie
*
Offline Offline

Posts: 12

Thank You
-Given: 11
-Receive: 0


« Reply #1 on: June 17, 2008, 09:22:17 09:22 »

Code:
Device = 16F877
XTAL=4
Dim val1 As Float
Dim val2 As Float

Dim intarray[10] As Word
Dim floatarray[10] As Word

Declare LCD_INTERFACE 4
Declare LCD_DTPIN PORTB.4
Declare LCD_ENPIN PORTB.3
'DECLARE LCD_RWPIN PORTB.2
Declare LCD_RSPIN PORTB.1


val1=23.342

intarray[1]=val1
floatarray[1]=(val1-intarray[1])*1000
Print At 1,1,#intarray[1],",",#floatarray[1]

loop:
  DelayMS 100
GoTo loop


This sample dosn't work if you use PIC16F84. Proton doesn't compile if you choose device = 16f84. I used only one byte long array but you can use long size arrays in your programs. 
Logged
KhaledLotfy
Junior Member
**
 Muted
Offline Offline

Posts: 39

Thank You
-Given: 19
-Receive: 8


« Reply #2 on: June 22, 2008, 11:06:53 11:06 »

I will try it,
I'm using PIC18F452,
this task is  simple in MiKroBasic,or MiKroC,but with Proton,one must play around;
I must Give thanks for your help Start;
Regards
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC