Skip to content

Commit 7dfde1a

Browse files
committed
2 parents 2916079 + a8e733f commit 7dfde1a

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

COSQuickRef.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ A list of some common ObjectScript expressions
1717
| Determine if an object was modified | `Set variable = object.%IsModified()` |
1818
| Validate an object without saving | `Set status = object.%ValidateObject()` |
1919
| Validate a property without saving | `Set status = ##class(package.class).PropertyIsValid(object.Property)` |
20-
| Print status after error | `Do $system.Status.DisplayError(status)`<br>`Zwrite status` (v2012.2+) |
20+
| Print status after error | `Do $system.Status.DisplayError(status)`<br>`Write $system.Status.GetErrorText(status)` |
2121
| Obtain status details after error | `Do $system.Status.DecomposeStatus(status, .err)` |
2222
| Remove an object from process memory | `Set object = ""` |
2323
| Delete an existing object of a class | `Set status = ##class(package.class).%DeleteId(id)` |

README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# cos-guidelines
1+
# Caché ObjectScript (COS) Code Guidelines
2+
23
This is the first approximation of Caché ObjectScript (COS) guidelines we use for github.com/intersystems-ru projects. There are mandatory and recommended parts.
34

45
We do not plan to be very restrictive, but want be rather flexible enough and allow any *reasonable* style.
@@ -7,17 +8,17 @@ If there is some style already established in the class or utility being modifie
78
to continue use that same style, than introducing yet another one, which may be more recommended
89
but which will be introducing some unnecessary inconsistency.
910

10-
## Cheat sheet
11+
## Quick Reference Guide
1112

12-
For COS cheat sheet refer [here](COSQuickRef.md).
13+
For Caché ObjectScript quick reference guide see [here](COSQuickRef.md).
1314

14-
## Mandatory part
15+
## Mandatory Part
1516

1617
* Only "modern" syntax permitted, dotted syntax is not generally allowed (with few exceptions);
1718
* No short name for statements keywords or built-in functions allowed - use fully expanded names;
1819
* Comment your code appropriately, use English in comments to make your code easy to understand by your international colleagues. Same English-based rule applies to global, local, and type names.
1920

20-
## Recommended part
21+
## Recommended Part
2122
* We recommend to use fully expanded keyword or function name in lower case or capitalized. Whatever you'll select should be consistent across class or utility, i.e.
2223
```
2324
If (expression) {

0 commit comments

Comments
 (0)