Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Data type conversion

Reply
Thread Tools

Data type conversion

 
 
Stachu Chebel
Guest
Posts: n/a
 
      03-12-2013
Hi,
Suppose I have 2 variables declared as follows:

variable x:integer;
variable t:time;

How to convert 't' (measured in ps) into 'x' ?
 
Reply With Quote
 
 
 
 
KJ
Guest
Posts: n/a
 
      03-12-2013
On Tuesday, March 12, 2013 8:48:43 AM UTC-4, Stachu Chebel wrote:
> Hi, Suppose I have 2 variables declared as follows:
> variable x:integer;
> variable t:time;


> How to convert 't' (measured in ps) into 'x' ?


x := t / 1 ps; -- x will be the integer number of picoseconds
x := t / 1 ns; -- x will be the integer number of nanoseconds
x := t / 1 us; -- x will be the integer number of microseconds
....

Kevin Jennings

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Type conversion function for user defined type... zaeminkr@gmail.com C++ 1 05-16-2007 09:00 AM
conversion from const type* to type* allowed? Michal Nazarewicz C Programming 13 01-05-2007 01:54 PM
Conversion from type 'DBNull' to type 'String' is not valid Chris ASP .Net 2 05-11-2006 08:20 AM
conversion from type 'DBNull' to type 'float' is not valid ibiza ASP .Net 2 01-27-2006 09:57 PM
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. luna ASP .Net 1 02-13-2004 01:15 PM



Advertisments