Monday, July 30, 2007

Re: [oopic] Re: Has anyone handled this issue - before

The V.5 compiler has a bug in nod-object array indexing, however in the V.6 compiler you can also make an array of just BYTE data.

Dim things(6) as BYTE

DDC

ooPIC Tech Support

-----Original Message-----

From: "rtstofer" <rstofer@pacbell.net>
Subj: [oopic] Re: Has anyone handled this issue - before
Date: Mon Jul 30, 2007 9:41 am
Size: 1K
To: oopic@yahoogroups.com

--- In oopic@yahoogroups.com, "Kelly" <kelly4football@...> wrote:
>
> I have an array of 6 pieces of data, and I know I can use the oRam to
> write and read this array, but does anyone know how I can allocate
this
> memory so that I can see that nothing else (other variables) are
going
> to use that space in memory.
>

oRAM is an advanced concept and, AFAIK, the internal use of RAM is not
documented. There are plenty of caution notes that suggest using this
object is a bad idea.

Since you are not looking for persistence, you can simply create an
array of oBytes like:

Dim Things(3) as new oByte
Dim Serial as new oSerialPort

sub main()
Things(1) = 13
Things(2) = 14
Things(3) = 15
If Things(3) - Things(2) + Things(1) = 14 then
Serial.String = "OK" + chr$(10) + chr$(13)
else
Serial.String = "OOPS" + chr$(10) + chr$(13)
end if
Serial.String = STR$(Things(2)) + chr$(10) + chr$(13)
end sub

You can also use oBuffer but it isn't as intuitive as simply creating
an array.

OTOH, every oByte requires 2 bytes of object memory and there are only
86 bytes to start with.

If you do want persistence, try oEEPROM.

Richard



Yahoo! Groups Links



Yahoo! Groups Links

<*> To visit your group on the web, go to:

http://groups.yahoo.com/group/oopic/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:

http://groups.yahoo.com/group/oopic/join

(Yahoo! ID required)

<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

http://docs.yahoo.com/info/terms/

No comments:

Post a Comment