You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
5.[Using gyb_utils.py for Shared Utilities](#using-gyb-utils-py-for-shared-utilities)
27
33
28
-
4.1 [Declaring global variables](#declaring-global-utilities-in-gyb-utils-py)
34
+
5.1 [Declaring global variables](#declaring-global-utilities-in-gyb-utils-py)
29
35
30
-
4.2 [Importing and Using Utilities](#importing-and-using-utilities-in-gyb-templates)
36
+
5.2 [Importing and Using Utilities](#importing-and-using-utilities-in-gyb-templates)
31
37
32
38
6.[Using GYB with ObjC and ObjC++](#using-gyb-with-objective-c-and-objective-c++)
33
39
@@ -214,6 +220,47 @@ struct User {
214
220
215
221
## Supported Types
216
222
223
+
GYB supports a variety of data types, allowing you to easily generate code with the required type annotations and variable declarations. The following types are supported:
| `std::string` | Represents a string object from the C++ Standard Library. | N/A | `std::string name = "John";`|
258
+
| `int` | Represents a signed integer. | `-2147483648` to `2147483647` | `int age = 30;` |
259
+
| `unsigned int` | Represents an unsigned integer. | `0` to `4294967295` | `unsigned int count = 5;` |
260
+
| `bool` | Represents a Boolean value (`true` or `false`). | `true` or `false` | `bool isValid = true;` |
261
+
| `float` | Represents a single-precision floating-point number. | ~±3.4e38 | `float pi = 3.14f;` |
262
+
| `double` | Represents a double-precision floating-point number. | ~±1.7e308 | `double e = 2.71828;` |
263
+
217
264
## Using gyb_utils.py for Shared Utilities
218
265
219
266
The `gyb_utils.py` file in the Scribble GYB configuration allows you to declare global variables, helper functions, or imports that can be reused across different GYB templates. This is especially useful when you have common logic or variables that need to be shared.
0 commit comments