answersLogoWhite

0

both struct and unit are objects just like in any other OOP.

the difference is in the time of creation of the object. while struct can be created and recreated at any time during the run (just like doing x=new(); in other OOP languages), units are created only at the beginning, and are static, meaning that they cannot be deallocated during run-time. however, their fields can still be changed.

in other words, all the units that are under sys (top level) are automatically generated at "world creation", and no other units can be created. structs are used for dynamic data that is allocated and dealloacated during the run

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Electrical Engineering

What is the difference between ampere and volt?

Liken volt and amp to a water in a pipe. Voltage is the water pressure in the pipe and amperage is the water flow through the pipe. They are two completely different electrical units.


What is the difference between Kilovolt Ampere and Kilowatt?

A kilowatt is an unit of true power in an AC circuit -as measured by a wattmeter. A kilovolt ampere is an unit of apparent power in an AC circuit, which is the product of the voltage across a load by the current through it. The relationship between the two is: kilowatt = (kilovolt ampere) x (power factor of load)


What the difference between the Ring Main Unit and the Extensible Oil Switch?

Ring Main Unit (RMU) is suppose to work in medium voltage. It is flexible and allows a free flow and maintains continuity. These are very compact in size. RMU are both Extensible & Non-extensible types.


What symbol is used to measure potential difference?

V which abbreviates the word volt, which is the unit of measure of the difference in electromotive force (EMF), (or electric potential) between two points of contact; the resulting voltage difference could be direct current (DC) or alternating current (AC) depending on the source of the voltage difference.


What is voltage difference?

Voltage at a point is defined as the work done by a unit positive charge carrying it from infinity to that point. while volage diffrance between two points is the work done bye unit positive charge from one point to the other point.work may be positive or negative depend upon the nature of charge that's why the potential will be negative or positive .CommentBy definition, voltage means potential difference. For this reason, you cannot have 'a voltage at a point' because potential difference, or voltage, exists between two points. You can, however, have a potential at a point.

Related Questions

What is the difference between a unit cube and a cubic unit?

Nothing


What is the difference between a unit of stock and a share of stock?

No difference. A unit of stock is called a share.


What is the difference between scheme of work and unit plan?

There is no difference between a unit plan and a scheme of wok. thank u. By highkult


What the difference between the laser unit of Noritsu QSS32 and QSS34?

There is no difference.


Difference between structure and class in c?

In C#, a struct is a Value type derived from Object, and provides no inheritance.A class is also derived from Object but as a Referencetype, also allow subtypes to be drived from a class, unless it is declared as sealed.That is, a struct like:public struct A {}anda class like:public sealed class B {}Are almost the same, except when an instance being passed as an argument to a method, an instance of A is passed by value, while an instance of B is passed by reference (by default).A class can be declared as abstract, while a struct cannot be one.class provides a class hierarchy (yes you can build a class tree), while struct is a flat and boring 1-level sealed module unit (but as a value type).


What is the difference between a tangent and a unit tangent?

1


What is the difference between meters and milliliters?

A meter is a unit of length; a milliliter is a unit of volume.


Explain the difference between molecule and formula unit?

The formula unit is the representation of a molecule.


What is the difference between temperature and degree?

A degree is a unit of temperature.


What is the difference between ohms and volts?

ohms is the unit of resistance while volts is the unit of voltage


What is the difference between pound and inch?

The pound is a mass unit while inch is a length unit


What is the difference between a pica and a pixel?

A pica is a unit of type size, a pixel is a unit of illumination.