# AppSourceCop Error AS0078
Adding or removing a var modifier in external procedures is not allowed
## Description
Adding or removing a var modifier in public procedures is not allowed as it might break the runtime behavior of extensions calling it.
## Remarks
This error ensures that the behavior of public procedures remains consistent and predictable. Adding or removing a var modifier can significantly change how parameters are handled within a procedure. Extensions that call these procedures may rely on the original parameter passing mechanism (by value or by reference). Altering this mechanism can cause compatibility issues, runtime errors, and unexpected behavior in these extensions. Maintaining the original parameter passing mechanism ensures that the procedure's behavior remains stable and that dependent extensions continue to function as expected.
## How to fix this diagnostic?
To resolve this error, follow these steps:
1. Locate the public procedure in your code where the var modifier has been added or removed from a parameter.
2. Modify the procedure definition to restore the original var modifier status of the parameter.
## Related information
AppSourceCop Analyzer<appsourcecop>
Get Started with AL<../devenv-get-started>
Developing Extensions<../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/appsourcecop-as0078, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/appsourcecop-as0078/
