![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 4 of 4 total |
![]() |
Mon, Apr 1 2019 5:27 AM | Permanent Link |
Matthew Jones | Is there anything that stops me defining one type to be based on another?
Obviously in classes you can do that, but can I say a new type is a string "underneath", while getting the type safety of classes? (Related obviously to my datetime question, where I'd like to stop random strings getting copied in to my datetime properties). -- Matthew Jones |
Mon, Apr 1 2019 9:50 AM | Permanent Link |
ooptimum | Matthew,
You may do that, but any string still be assignable to a variable of this new type. |
Mon, Apr 1 2019 10:29 AM | Permanent Link |
Matthew Jones | ooptimum wrote:
> Matthew, > > You may do that, but any string still be assignable to a variable of this new type. Thanks - better than nothing I guess. -- Matthew Jones |
Thu, Apr 4 2019 10:49 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Matthew,
<< Is there anything that stops me defining one type to be based on another? >> No. As ooptimum points out, you will still be able to assign the base type to any variables/paramters that use the new type. This is true even if you define a new type instead of a type synonym: TMyType = type String; Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Saturday, June 3, 2023 at 10:17 AM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |