diff --git a/docs/Miscellaneous/Documentation Development.md b/docs/Miscellaneous/Documentation Development.md index eabffcd6..08d2740c 100644 --- a/docs/Miscellaneous/Documentation Development.md +++ b/docs/Miscellaneous/Documentation Development.md @@ -75,38 +75,59 @@ These are modules within VBA and VBRUN: > [!NOTE] > -> All non-alphabetic characters are removed from the links. All attribute names are in lowercase in the links. I.e. `ArrayBoundsChecks(Bool)` is referenced as `/tB/Core/Attributes#arrayboundschecksbool`. +> All non-alphabetic characters, as well as parameters, are removed from the links. All attribute names are in lowercase in the links. E.g. `ArrayBoundsChecks(Bool)` is referenced as `/tB/Core/Attributes#arrayboundschecks`. - [AppObject](../tB/Core/Attributes#appobject) -- [ArrayBoundsChecks(Bool)](../tB/Core/Attributes#arrayboundschecksbool) -- [CoClassCustomConstructor(String)](../tB/Core/Attributes#coclasscustomconstructorstring) -- [CoClassId(String)](../tB/Core/Attributes#coclassidstring) -- [ComCreatable(Bool)](../tB/Core/Attributes#comcreatablebool) -- [ComExtensible(Bool)](../tB/Core/Attributes#comextensiblebool) +- [ArrayBoundsChecks](../tB/Core/Attributes#arrayboundschecks) +- [BindOnlyIfNoArguments](../tB/Core/Attributes#bindonlyifnoarguments) +- [BindOnlyIfStringSuffix](../tB/Core/Attributes#bindonlyifstringsuffix) +- [ClassId](../tB/Core/Attributes#classid) +- [CoClassCustomConstructor](../tB/Core/Attributes#coclasscustomconstructor) +- [CoClassId](../tB/Core/Attributes#coclassid) +- [COMControl](../tB/Core/Attributes#comcontrol) +- [COMCreatable](../tB/Core/Attributes#comcreatable) +- [COMExtensible](../tB/Core/Attributes#comextensible) - [ComImport](../tB/Core/Attributes#comimport) -- [CompileIf(Bool)](../tB/Core/Attributes#compileifbool) +- [CompileIf](../tB/Core/Attributes#compileif) +- [CompilerOptions](../tB/Core/Attributes#compileroptions) - [ConstantFoldable](../tB/Core/Attributes#constantfoldable) -- [Debuggable(Bool)](../tB/Core/Attributes#debuggablebool) +- [ConstantFoldableNumericsOnly](../tB/Core/Attributes#constantfoldablenumericsonly) +- [Debuggable](../tB/Core/Attributes#debuggable) - [DebugOnly](../tB/Core/Attributes#debugonly) -- [Description(String)](../tB/Core/Attributes#description) -- [DispId(Integer)](../tB/Core/Attributes#dispidinteger) +- [Description](../tB/Core/Attributes#description) +- [DispId](../tB/Core/Attributes#dispid) - [DllExport](../tB/Core/Attributes#dllexport) -- [DllStackCheck(Bool)](../tB/Core/Attributes#dllstackcheckbool) -- [EnumId(String)](../tB/Core/Attributes#enumidstring) +- [DLLStackCheck](../tB/Core/Attributes#dllstackcheck) +- [EnforceErrors](../tB/Core/Attributes#enforceerrors) +- [EnforceWarnings](../tB/Core/Attributes#enforcewarnings) +- [EnumId](../tB/Core/Attributes#enumid) +- [EventInterfaceId](../tB/Core/Attributes#eventinterfaceid) +- [EventsUseDispInterface](../tB/Core/Attributes#eventsusedispinterface) - [Flags](../tB/Core/Attributes#flags) -- [FloatingPointErrorChecks(Bool)](../tB/Core/Attributes#floatingpointerrorchecksbool) +- [FloatingPointErrorChecks](../tB/Core/Attributes#floatingpointerrorchecks) +- [FormDesignerId](../tB/Core/Attributes#formdesignerid) - [Hidden](../tB/Core/Attributes#hidden) -- [IntegerOverflowChecks(Bool)](../tB/Core/Attributes#integeroverflowchecksbool) -- [InterfaceId(String)](../tB/Core/Attributes#interfaceidstring) -- [OleAutomation(Bool)](../tB/Core/Attributes#oleautomationbool) -- [PopulateFrom(…)](../tB/Core/Attributes#populatefrom) +- [IdeButton](../tB/Core/Attributes#idebutton) +- [IntegerOverflowChecks](../tB/Core/Attributes#integeroverflowchecks) +- [InterfaceId](../tB/Core/Attributes#interfaceid) +- [MustBeQualified](../tB/Core/Attributes#mustbequalified) +- [OleAutomation](../tB/Core/Attributes#oleautomation) +- [PackingAlignment](../tB/Core/Attributes#packingalignment) +- [PopulateFrom](../tB/Core/Attributes#populatefrom) - [PredeclaredID](../tB/Core/Attributes#predeclaredid) -- [PreserveSig(Bool)](../tB/Core/Attributes#preservesigbool) +- [PreserveSig](../tB/Core/Attributes#preservesig) - [Restricted](../tB/Core/Attributes#restricted) - [RunAfterBuild](../tB/Core/Attributes#runafterbuild) -- [SetDllDirectory(Bool)](../tB/Core/Attributes#setdlldirectorybool) -- [TypeHint(EnumType)](../tB/Core/Attributes#typehintenumtype) +- [Serialize](../tB/Core/Attributes#serialize) +- [SetDllDirectory](../tB/Core/Attributes#setdlldirectory) +- [SimplerByVals](../tB/Core/Attributes#simplerbyvals) +- [TestCase](../tB/Core/Attributes#testcase) +- [TestFixture](../tB/Core/Attributes#testfixture) +- [TypeHint](../tB/Core/Attributes#typehint) - [Unimplemented](../tB/Core/Attributes#unimplemented) +- [UseGetLastError](../tB/Core/Attributes#usegetlasterror) +- [UserDefinedTypeIsAnAlias](../tB/Core/Attributes#userdefinedtypeisanalias) +- [WindowsControl](../tB/Core/Attributes#windowscontrol) ## Development Environment diff --git a/docs/Reference/Attributes.md b/docs/Reference/Attributes.md index 16a13a6a..b880b320 100644 --- a/docs/Reference/Attributes.md +++ b/docs/Reference/Attributes.md @@ -15,6 +15,11 @@ Attributes have two major functions: Previously in VBx, these attributes, such as the procedure description, hidden, default member, and others, were set via hidden text the IDE's editor didn't show you, configured via the Procedure Attributes dialog or some other places. In tB, these are all visible in the code editor. The legacy ones from VBx are supported for compatibility, but new attributes utilize the following syntax: `[Attribute]` or `[Attribute(value)]` +In attributes that take an optional boolean argument, the value of the argument is taken to be **True** if no value is provided. This does not mean that the default value of the attribute is True, just that if the attribute is specified within the braces with no value, its value will be set to True. Different boolean-valued attributes have different default values. Those values apply unless the user has explicitly provided the attribute. + +Multiple attributes can be specified in the same square braces, separated by comma: +`[Attribute1, Attribute2(param), Attribute3]` + --- The available attributes are listed below in alphabetic order. Not every attribute applies to every language element. The applicability of each attribute is given below its syntax. @@ -22,25 +27,61 @@ The available attributes are listed below in alphabetic order. Not every attribu {:toc} --- -## AppObject +## AppObject (optional Bool) -Syntax: **[AppObject]** +{: #appobject } + +Syntax: **[AppObject** [ **( True** \| **False )** ] **]** Applicable to: [**CoClass**](CoClass) -Indicates the class is part of the global namespace. You should not include this attribute without a full understanding of the meaning. +Legacy VB attribute: *VB_GlobalNameSpace* + +Indicates the class is part of the global namespace. You should not include this attribute without a full understanding of the meaning. The **Global** class is an AppObject. -## ArrayBoundsChecks(Bool) +For more details, see [this VBA documentation page](https://learn.microsoft.com/en-us/openspecs/microsoft_general_purpose_programming_languages/ms-vbal/189fb41b-cc3a-4999-a6d2-ba89f72d2870). + +## ArrayBoundsChecks (optional Bool) {: #arrayboundschecks } -Syntax: **ArrayBoundsChecks( True** \| **False)** +Syntax: **[ArrayBoundsChecks** [ **( True** \| **False )** ] **]** Applicable to: [**Class**](Class), [**Module**](Module), [procedure](../Gloss#procedure) -Disables array element access bounds checking. Used on performance-critical routines. The default value is **True**. +Disables or enables array element access bounds checking within the scope of a class, module, or a single procedure/method. Used on performance-critical routines. + +## BindOnlyIfNoArguments (optional Bool) + +{: #bindonlyifnoarguments } + +Syntax: **[BindOnlyIfNoArguments** [ **( True** \| **False )** ] **]** + +Applicable to: [procedure](../Gloss#procedure) + +Only binds this name to a callsite when no arguments are present. Normally false, but see below for an exception. + +This attribute resolves the cases where compiler's special treatment of certain procedure names conflicts with a procedure of the same name that shouldn't be treated specially. This currently affects procedures named `Left`. Such procedures get an implicit `[BindOnlyIfNoArguments(True)]` assigned by the compiler. If the user wants to have a procedure of this name, it should include `[BindOnlyIfNoArguments(False)]`. + +## BindOnlyIfStringSuffix (optional Bool) + +{: #bindonlyifstringsuffix } + +Syntax: **[BindOnlyIfStringSuffix** [ **( True** \| **False )** ] **]** + +Applicable to: [procedure](../Gloss#procedure) -## CoClassCustomConstructor(String) +## ClassId (String) + +{: #classid } + +Syntax: **[ClassId("** 00000000-0000-0000-0000-000000000000 **")]** + +Applicable to: [**Class**](Class) + +Assigns a COM CLSID to a class. For details, [see this COM documentation page](https://learn.microsoft.com/en-us/windows/win32/com/com-class-objects-and-clsids). + +## CoClassCustomConstructor (String) {: #coclasscustomconstructor } @@ -63,11 +104,11 @@ End CoClass For an overview of coclasses in tB, see [Defining coclasses](../../Features/Overview#defining-coclasses). -## CoClassId(String) +## CoClassId (String) {: #coclassid } -Syntax: **[CoClassId("**00000000-0000-0000-0000-000000000000**")]** +Syntax: **[CoClassId("** 00000000-0000-0000-0000-000000000000 **")]** Applicable to: [**CoClass**](CoClass) @@ -87,35 +128,47 @@ The methods are [procedures](../Gloss#procedure). For an overview of coclasses in tB, see [Defining coclasses](../../Features/Overview#defining-coclasses). -## ComCreatable(Bool) +## COMControl (optional Bool) + +{: #comcontrol } + +Syntax: **[COMControl** [ **( True** \| **False )** ] **]** + +Applicable to: [**Interface**](Interface) + +## COMCreatable (optional Bool) {: #comcreatable } -Syntax: **[ComCreatable(True** \| **False)]** +Syntax: **[COMCreatable** [ **( True** \| **False )** ] **]** Applicable to: [**CoClass**](CoClass) -Indicates that this coclass can be created with the [**New**](New) keyword. This attribute is is **True** by default. +Indicates that this coclass can be created with the [**New**](New) keyword. -## ComExtensible(Bool) +## COMExtensible (optional Bool) {: #comextensible } -Syntax: **[ComExtensible(True** \| **False)]** +Syntax: **[COMExtensible** [ **( True** \| **False )** ] **]** Applicable to: [**Interface**](Interface), [procedure in an Interface](../Gloss#procedure) Specifies whether new members added at runtime can be called by name through an interface implementing **IDispatch**. This attribute is set to **False** by default. -## ComImport +## ComImport (optional Bool) -Syntax: **[ComImport]** +{: #comimport } + +Syntax: **[ComImport** [ **( True** \| **False )** ] **]** Applicable to: [**Interface**](Interface) Specifies that an interface is an import from an external COM library, for instance, the Windows shell. -## CompileIf(Bool) +## CompileIf (Bool) + +{: #compileif } Syntax: **[CompileIf(** condition **)]** @@ -123,33 +176,70 @@ Applicable to: [procedure definitions](../Gloss#procedure) Controls the conditional compilation of a procedure definition. Has no default value. -## ConstantFoldable +## CompilerOptions (String) + +{: #compileroptions } + +Syntax: **[CompilerOptions( "** options **" )]** + +Applicable to: [procedure definitions](../Gloss#procedure) + +Typical use would be `[CompilerOptions("+llvm,+optimize,+optimizesize")]` ⁠to compile the procedure using built-in LLVMinstead of the default compiler, with chosen optimizations. Compiler options available: + +- **+llvm** - uses LLVM to compile this procedure. This feature is experimental at the moment, and cannot be used to compile functions with "complex" argument/variable types, such as objects, strings and dynamic arrays. The LLVM compiler back-end is built into twinBASIC. It is not necessary to have LLVM separately installed, and any such installation is ignored by twinBASIC. +- **+optimize** - enables optimization during compilation of this procedure +- **+optimizesize** - optimize this procedure for small code size, potentially at the expense of slower speed of the procedure +- **+optimizespeed** - optimize this procedure for fast speed, potentially at the expense of larger code size post-compilation + +## ConstantFoldable (optional Bool) -Syntax: **[ConstantFoldable]** +{: #constantfoldable } + +Syntax: **[ConstantFoldable** [ **( True** \| **False )** ] **]** Applicable to: [**Function**](Function) Specify this attribute for functions where when called with non-variable input, will be computed at compile time, rather than runtime. For example, a function to converted string literals to ANSI. The result would never change, so the resulting ANSI string is stored, rather than recomputing every run. Such functions are also called *pure functions*, because their output only depends on the arguments, and not on the state of the program. -## Debuggable(Bool) +## ConstantFoldableNumericsOnly (optional Bool) + +{: #constantfoldablenumericsonly } + +Syntax: **[ConstantFoldableNumericsOnly** [ **( True** \| **False )** ] **]** + +Applicable to: [**Function**](Function) + +A limited case of [constant foldable attribute](#constantfoldable), which applies only if the function was called with a numeric parameter. + +## CustomControl (String) + +{: #customcontrol } + +Syntax: **[Description("** image file name **")]** + +Applicable to: [**Class**](Class) + +## Debuggable (optional Bool) {: #debuggable } -Syntax: **[Debuggable(True** \| **False)]** +Syntax: **[Debuggable** [ **( True** \| **False )** ] **]** Applicable to: [**Module**](Module), [procedure in a Class or Module](../Gloss#procedure) When false, turns of breakpoints and stepping for the method or module. The default value is **True**. -## DebugOnly +## DebugOnly (optional Bool) + +{: #debugonly } -Syntax: **[DebugOnly]** +Syntax: **[DebugOnly** [ **( True** \| **False )** ] **]** Applicable to: [procedure definitions](../Gloss#procedure) Excludes calls to this procedure from the Build. They are only available when running from the IDE, i.e. debugging. -## Description(String) +## Description (String) {: #description } Syntax: **[Description("** arbitrary text **")]** @@ -158,7 +248,7 @@ Applicable to: [**Class**](Class), [**CoClass**](CoClass), [**Const**](Const), [ Provides a description in information popups in the IDE, and is exported as a `helpstring` attribute in the type library (if applicable). -## DispId(Integer) +## DispId (Integer) {: #dispid } @@ -168,9 +258,11 @@ Applicable to: [procedure in an Interface](../Gloss#procedure) Defines a dispatch ID associated with the procedure. -## DllExport +## DllExport (optional Bool) -Syntax: **[DllExport]** +{: #dllexport } + +Syntax: **[DllExport** [ **( True** \| **False )** ] **]** Applicable to: [procedures](../Gloss#procedure) and variables in a module. @@ -181,17 +273,33 @@ It's possible to export a function or variable from standard modules. Example: Public Const MyExportedSymbol As Long = &H00000001 ``` -## DllStackCheck(Bool) +## DLLStackCheck (optional Bool) {: #dllstackcheck } -Syntax: **DllStackCheck( True** \| **False)** +Syntax: **[DLLStackCheck** [ **( True** \| **False)** ] **]** Applicable to: [**Declare** (API declaration)](Declare) Gives minor codegen size reduction on 32-bit API calls on the Intel platform. Has no effect on other platforms. -## EnumId(String) +## EnforceErrors (optional Bool) + +{: #enforceerrors } + +Syntax: **[EnforceErrors** [ **( True** \| **False )** ] **]** + +Applicable to: [procedures](../Gloss#procedure). + +## EnforceWarnings (optional Bool) + +{: #enforcewarnings } + +Syntax: **[EnforceWarnings** [ **( True** \| **False )** ] **]** + +Applicable to: [procedures](../Gloss#procedure). + +## EnumId (String) {: #enumid } @@ -201,9 +309,23 @@ Applicable to: [**Enum**](Enum) Specifies a GUID to be associated with an enum in type libraries. -## Flags +## EventInterfaceId (String) + +{: #eventinterfaceid } + +Syntax: **[EventInterfaceId("** 00000000-0000-0000-0000-000000000000 **")]** + +## EventsUseDispInterface (optional Bool) + +{: #eventsusedispinterface } -Syntax: **[Flags]** +Syntax: **[EventsUseDispInterface** [ **( True** \| **False )** ] **]** + +## Flags (optional Bool) + +{: #flags } + +Syntax: **[Flags** [ **( True** \| **False )** ] **]** Applicable to: [**Enum**](Enum) @@ -214,39 +336,63 @@ Calculate implicit enum values as a flag set (powers of 2). ![image](Images/flags attribute.png) -## FloatingPointErrorChecks(Bool) +## FloatingPointErrorChecks (optional Bool) {: #floatingpointerrorchecks } -Syntax: **FloatingPointErrorChecks( True** \| **False)** +Syntax: **[FloatingPointErrorChecks** [ **( True** \| **False)** ] **]** Applicable to: [**Class**](Class), [**Module**](Module), [procedure](../Gloss#procedure) Disables floating point error checks. Used on performance-critical routines. The default value is **True**. -## Hidden +## FormDesignerId (String) + +{: #formdesignerid } + +Syntax: **[FormDesignerId("** 00000000-0000-0000-0000-000000000000 **")]** + +Applicable to: [**Class**](Class) + +## Hidden (optional Bool) -Syntax: **[Hidden]** +{: #hidden } + +Syntax: **[Hidden** [ **(** **True** \| **False** **)** ] **]** Applicable to: [**CoClass**](CoClass), [**Interface**](Interface) Hides the interface or coclass from certain Intellisense and other lists. -## IntegerOverflowChecks(Bool) +## IdeButton (String) + +{: #idebutton } + +Syntax: **[IdeButton("** caption **")]** + +Applicable to: [procedure](../Gloss#procedure) definition in a module. + +## IgnoreWarnings (optional Bool) + +{: #ignorewarnings } + +Syntax: **[IgnoreWarnings** [ **( True** \| **False )** ] **]** + +## IntegerOverflowChecks (optional Bool) {: #integeroverflowchecks } -Syntax: **IntegerOverflowChecks( True** \| **False)** +Syntax: **[IntegerOverflowChecks** [ **( True** \| **False )** ] **]** Applicable to: [**Class**](Class), [**Module**](Module), [procedure](../Gloss#procedure) Disables integer overflow checks. Used on performance-critical routines. The default value is **True**. -## InterfaceId(String) +## InterfaceId (String) {: #interfaceid } -Syntax: **[InterfaceId("**00000000-0000-0000-0000-000000000000**")]** +Syntax: **[InterfaceId( "**00000000-0000-0000-0000-000000000000**" )]** Applicable to: [**Interface**](Interface) @@ -268,21 +414,37 @@ The methods are [procedures](../Gloss#procedure). For an overview of interfaces in tB, see [Defining interfaces](../../Features/Overview#defining-interfaces). -## OleAutomation(Bool) +## MustBeQualified (optional Bool) + +{: #mustbequalified } + +Syntax: **[MustBeQualified** [ **(True** \| **False )** ] **]** + +Applicable to: [procedure](../Gloss#procedure) + +## OleAutomation (optional Bool) {: #oleautomation } -Syntax: **[OleAutomation(True** \| **False)]** +Syntax: **[OleAutomation** [ **(True** \| **False )** ] **]** Applicable to: [**Interface**](Interface) Controls whether this attribute is applied in the typelibrary. This attribute is set to **True** by default. -## PopulateFrom(...) +## PackingAlignment (Integer) + +{: #packingalignment } + +Syntax: **[PackingAlignment( 1** \| **2** \| **4** \| **8** \| **16** \| **32** \| **64 )]** + +Applicable to: [**Type** (UDT)](Type) + +## PopulateFrom (...) {: #populatefrom } -Syntax: **[PopulateFrom("json", "**internal path to .json**", "** table field **", "** name field **", "** value field **" )]** +Syntax: **[PopulateFrom( "json", "**internal path to .json**", "** table field **", "** name field **", "** value field **" )]** Applicable to: [**Enum**](Enum) @@ -323,9 +485,11 @@ Enum EVENTS End Enum ``` -## PredeclaredID +## PredeclaredID (optional Bool) + +{: #predeclaredid } -Syntax: **[PredeclaredId]** +Syntax: **[PredeclaredId** [ **( True** \| **False )** ] **]** Applicable to: [**Class**](Class) @@ -333,7 +497,7 @@ When set, a global instance of the class is created when the application starts. This attribute is equivalent to the `VB_PredeclaredId` attribute in VBx .cls files. -## PreserveSig(Bool) +## PreserveSig (optional Bool) {: #preservesig } @@ -358,9 +522,11 @@ can be rewritten as Public Declare PtrSafe Function SHGetDesktopFolder Lib "shell32" () As IShellFolder` ``` -## Restricted +## Restricted (optional Bool) -Syntax: **[Restricted]** +{: #restricted } + +Syntax: **[Restricted** [ **( True** \| **False )** ] **]** Applicable to: [**Interface**](Interface) @@ -370,25 +536,65 @@ This is attribute has the same function as the [**restricted** MIDL attribute][M [MIDL restricted]: https://learn.microsoft.com/en-us/windows/win32/midl/restricted -## RunAfterBuild +## RunAfterBuild (optional Bool) + +{: #runafterbuild } -Syntax: **[RunAfterBuild]** +Syntax: **[RunAfterBuild** [ **( True** \| **False )** ] **]** Applicable to: [**Function**](Function), [**Sub**](Sub) Specifies a function that runs after your exe is built. Tthere's `App.LastBuildPath` to know where it is if you're e.g. signing the executable. -## SetDllDirectory(Bool) +## Serialize (optional Bool) + +{: #serialize } + +Syntax: **[Serialize** [ **( True** \| **False )** ] **]** + +Applicable to: variables in a [**Class**](Class) + +## SetDllDirectory (optional Bool) {: #setdlldirectory } -Syntax: **[SetDllDirectory( True** \| **False)]** +Syntax: **[SetDllDirectory** [ **( True** \| **False )** ] **]** Applicable to: [**Declare** (API declaration)](Declare), [**Module**](Module) Allows an explicitly loaded DLL to load its own dependencies from it's load path. Also has the effect of allowing searching the app path for the DLLs in the base app's declare statements. It can be used per-declare or within a module. -## TypeHint(EnumType) +## SimplerByVals (optional Bool) + +{: #simplerbyvals } + +Syntax: **[SimplerByVals** [ **( True** \| **False )** ] **]** + +Applicable to: [procedure](../Gloss#procedure) + +## SpecialCompilerBinding (optional Bool) + +{: #specialcompilerbinding } + +Syntax: **[SpecialCompilerBinding** [ **( True** \| **False )** ] **]** + +## TestCase (optional Bool) + +{: #testcase } + +Syntax: **[TestCase** [ **( True** \| **False )** ] **]** + +Applicable to: [procedure](../Gloss#procedure) definition in a module. + +## TestFixture (optional Bool) + +{: #testfixture } + +Syntax: **[TestFixture **[ **( True** \| **False )** ] **]** + +Applicable to: [**Module**](Module) + +## TypeHint (EnumType) {: #typehint } @@ -398,11 +604,36 @@ Applicable to: [procedure](../Gloss#procedure) parameters Allows populating Intellisense with an enum for types other than **Long**. -## Unimplemented +## Unimplemented (optional Bool) + +{: #unimplemented } -Syntax: **[Unimplemented]** +Syntax: **[Unimplemented** [ **( True** \| **False )** ] **]** Applicable to: [procedure](../Gloss#procedure) definitions Makes the compiler issue a warning about the procedure being unimplemented wherever it's called. You can upgrade it to an error too. +## UseGetLastError (optional Bool) + +{: #usegetlasterror } + +Syntax: **[UseGetLastError** [ **( True** \| **False )** ] **]** + +Applicable to: [**Declare** (API declaration)](Declare) + +If the declared function indicates an error condition, the compiler won't automatically call `GetLastError` to retrieve the error code. The default value of this attribute is **True**, i.e. Declare-d functions are assumed to set `LastError` upon error. + +## UserDefinedTypeIsAnAlias (optional Bool) + +{: #userdefinedtypeisanalias } + +Syntax: **[UserDefinedTypeIsAnAlias** [ **( True** \| **False )** ] **]** + +Applicable to: [**Type** (UDT)](Type) + +## WindowsControl (optional Bool) + +{: #windowscontrol } + +Syntax: **[WindowsControl** [ **( True** \| **False )** ] **]**