Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 09, 2016, 10:07:29 22:07


Login with username, password and session length


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

Posts: 37

Thank You
-Given: 4
-Receive: 8


« on: June 09, 2008, 07:04:57 19: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
*
 Muted
Offline Offline

Posts: 12

Thank You
-Given: 11
-Receive: 0


« Reply #1 on: June 17, 2008, 10:22:17 10: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: 37

Thank You
-Given: 4
-Receive: 8


« Reply #2 on: June 22, 2008, 12:06:53 12: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