Y-asc

yet another stupid compiler
Log | Files | Refs | README | git clone https://git.ne02ptzero.me/git/Y-asc

commit 3aa56fc9e7b43eee19f39372d7eae5c405fb9068
parent 8cad864ff6627f495332ccc2e1dba9b57d2d3117
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Tue, 27 Jun 2017 00:12:01 +0200

Add(Tex): Add section about variable types

Diffstat:
Mresources/syntax/vim/yasc.vim | 2+-
Mtex/yasc.tex | 22++++++++++++++++++++++
2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/resources/syntax/vim/yasc.vim b/resources/syntax/vim/yasc.vim @@ -14,7 +14,7 @@ let b:current_syntax = "yasc" syn keyword yascBasic return if else while do for struct use def " Types -syn keyword yascTypes bool u8 ubyte u16 u32 void +syn keyword yascTypes bool u8 s8 ubyte u16 s16 u32 s32 void " Specials keywords syn keyword yascSpecials __const __static __heap diff --git a/tex/yasc.tex b/tex/yasc.tex @@ -4,6 +4,7 @@ \usepackage{geometry} \usepackage{titling} \usepackage{listings} +\usepackage{amsmath} % Configuration \graphicspath{ {img/} } @@ -197,6 +198,27 @@ \subsection{Data types and Sizes} + One can use the following standard data types: + +$\begin{array}{|c|c|c|} +\hline +Name & Range & Content\\ +\hline +\text{ubyte} & \text{0 - 255} & \text{One byte, can be used for an ASCII-character}\\ +\hline +\text{u8} & \text{0 - 255} & \text{Unsigned integer on 8 bits, same as ubyte}\\ +\hline +\text{s8} & \text{-128 - 127} & \text{Signed integer on 8 bits}\\ +\hline +\text{u16} & \text{0 - 65,535} & \text{Unsigned integer on 16 bits}\\ +\hline +\text{s16} & \text{-32,768 - 32,767} & \text{Signed integer on 16 bits}\\ +\hline +\text{u32} & \text{-2,147,483,648 - 2,147,483,647} & \text{Unsigned integer on 32 bits}\\ +\hline +\text{s32} & \text{0 - 4,294,967,295} & \text{Signed integer on 32 bits}\\ +\hline +\end{array}$ \subsection{Constants} \subsection{Declarations} \subsection{Arithmetic Operators}