Skip to content

Commit

Permalink
Fix links.
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Mar 25, 2024
1 parent 976b97b commit 9817e09
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 85 deletions.
90 changes: 45 additions & 45 deletions src/content/docs/references/development/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ sidebar:

##### Revision 2023-01-24
- Consistently use printfn rather than printfln
- Added [short function](../functions) syntax.
- Added [lambdas](../functions).
- Added [short function](/references/docs/functions) syntax.
- Added [lambdas](/references/docs/functions).

##### Revision 2023-01-07
- Direct download links added.
Expand Down Expand Up @@ -115,7 +115,7 @@ sidebar:
- libc::printf replaced with io::printf

##### Revision 2022-10-01
- Expanded and updated [types](../types).
- Expanded and updated [types](/references/docs/types).

##### Revision 2022-07-20
- Added start + len syntax
Expand Down Expand Up @@ -188,18 +188,18 @@ sidebar:

##### Revision 2021-05-08
- Added rationale for some changes from C.
- Updated undefined and [undefined behaviour](../undefinedbehaviour).
- Updated undefined and [undefined behaviour](/references/docs/undefinedbehaviour).
- Removed many of the fine-grained module features.
- Removed "local" visibility in [modules](../modules).
- Removed "local" visibility in [modules](/references/docs/modules).
- All modules are now distinct, parent modules do not have any special access to submodules.
- Added `as module` imports.

##### Revision 2021-04-05
- "next" is now "nextcase".
- Added link to the C3 discord.
- The [conversions](../conversion) page updated with new conversion rules.
- The [conversions](/references/docs/conversion) page updated with new conversion rules.
- Updated compound literal syntax.
- Removed [undefined behaviour](../undefinedbehaviour) behaviour on integer overflow and added a list of unspecified behaviour.
- Removed [undefined behaviour](/references/docs/undefinedbehaviour) behaviour on integer overflow and added a list of unspecified behaviour.

##### Revision 2020-12-23
- Updated slice behaviour.
Expand All @@ -219,18 +219,18 @@ sidebar:
- Changed cast syntax to `cast(<expr> as <type>)`.

##### Revision 2020-07-08
- Additions to [error handling](../optionals).
- Additions to [error handling](/references/docs/optionals).
- Introduction of labelled `nextcase`, `break` and `continue`.
- Removal of `goto`.

##### Revision 2020-06-17
- Alternate casts in [idea](../ideas).
- Alternate casts in [idea](/references/docs/ideas).
- Method functions simply renamed to "method".
- Completely revised [error handling](../optionals).
- Completely revised [error handling](/references/docs/optionals).

##### Revision 2020-04-23
- Updated error handling, adding try-else-jump and changed how errors are passed.
- Included [reflection](../reflection) page
- Included [reflection](/references/docs/reflection) page

##### Revision 2020-03-30
- Added Odin and D to comparisons.
Expand All @@ -242,7 +242,7 @@ sidebar:

##### Revision 2020-03-29
- Type inference for enums.
- Included [macro](../macros) page.
- Included [macro](/references/docs/macros) page.
- Corrected precedence rules with `try` and `@`.
- Type functions.
- Managed variables back to ideas.
Expand All @@ -254,34 +254,34 @@ sidebar:
- Changed cast syntax from `@cast(Type, var)` to `cast(var, Type)`

##### Revision 2019-12-26
- Added module versioning system [idea](../ideas).
- Added module versioning system [idea](/references/docs/ideas).
- Fleshed out polymorphic functions.
- Unsigned to signed promotion mentioned in "changes from C"

##### Revision 2019-12-25
- Changes how generic modules work.
- Switched so that vararrays use `Type[*]` and slices use `Type[]`.
- Added submodule granularity, partial imports (only importing selected functions and types), removal of `local`, extended aliasing. See [modules](../modules).
- Added submodule granularity, partial imports (only importing selected functions and types), removal of `local`, extended aliasing. See [modules](/references/docs/modules).
- Updated "changes from C" with removal of multiple declarations.

##### Revision 2019-12-11
- Updated the [setup](../setup) page.
- Updated the [setup](/references/docs/setup) page.

##### Revision 2019-12-03
- Added page on [conversions](../conversion).
- Added page on [undefined behaviour](../undefinedbehaviour).
- Added page on [conversions](/references/docs/conversion).
- Added page on [undefined behaviour](/references/docs/undefinedbehaviour).

##### Revision 2019-11-01
- Updated "changes from C" with the lack of array decays.
- Added FourCC to the language
- Added name alias to ideas
- Added align asserts to ideas
- Added built in tests to ideas
- Added [arrays page](../arrays)
- Added function blocks to [statements page](../statements).
- Added [expressions page](../expressions).
- Added [variables page](../variables).
- Moved managed pointers from idea to the [variables page](../variables).
- Added [arrays page](/references/docs/arrays)
- Added function blocks to [statements page](/references/docs/statements).
- Added [expressions page](/references/docs/expressions).
- Added [variables page](/references/docs/variables).
- Moved managed pointers from idea to the [variables page](/references/docs/variables).

##### Revision 2019-09-30

Expand Down Expand Up @@ -313,59 +313,59 @@ sidebar:

##### Revision 2019-07-30

- Added default and named arguments to the [functions page](../functions).
- Added varargs to the [functions page](../functions).
- Added default and named arguments to the [functions page](/references/docs/functions).
- Added varargs to the [functions page](/references/docs/functions).
- Added idea about hierarchal memory.
- Added idea of raw dynamic safe arrays & strings.
- Volatile sections are no longer prefixed by '@'
- Added idea regarding c3 interop
- Added [page about c interop](../cinterop).
- Added [page about c interop](/references/docs/cinterop).
- Removed `c_ichar` and `c_uchar` types as they are redundant.
- Updates to keywords on the [grammar page]()../syntax).
- Updates to keywords on the [grammar page]()/references/docs/syntax).

##### Revision 2019-07-27

- Updated grammar with keywords.
- Added the [docs & comments](../comments) page.
- Updated the [pre- and post-conditions](../contracts).
- Added the [docs & comments](/references/docs/comments) page.
- Updated the [pre- and post-conditions](/references/docs/contracts).

##### Revision 2019-07-24

- Idea: typed varargs.
- Added "pure" [post condition](../contracts)
- Added "pure" [post condition](/references/docs/contracts)
- Updated c3c commands.
- Removed the `type` keyword for defining union/struct/enum/error.

##### Revision 2019-07-23

- Added to [generic functions](../generics) examples for [] and []=
- Developed ideas about vectors in the [idea section](../ideas).
- Added to [generic functions](/references/docs/generics) examples for [] and []=
- Developed ideas about vectors in the [idea section](/references/docs/ideas).
- Defined 2's complement for signed integers.
- Idea: Managed pointers.
- Updated [naming rules](../naming) for types.
- Added more [naming rules](../naming) + examples of them.
- Updated [naming rules](/references/docs/naming) for types.
- Added more [naming rules](/references/docs/naming) + examples of them.
- Removed "defer on function signatures" from ideas.
- Removed "managed qualifier" from ideas.
- Removed "defer sugar" from ideas.
- Removed "built in dynamic arrays" from ideas.
- Added [standard_library](../standard_library) section.
- Added more about [pre- and post-conditions](../contracts).
- Added [standard_library](/references/docs/standard_library) section.
- Added more about [pre- and post-conditions](/references/docs/contracts).

##### Revision 2019-07-22

- Added "Design Principles" to the index page.

##### Revision 2019-07-21

- "return" rather than function name is used in post conditions. See [Functions](../functions#pre-and-post-conditions)
- Added "@include" macro for textual includes. See [Modules](../modules#textual-includes).
- Files to without `module` for single file compilations is now ok as a special case. See [Modules](../modules)
- Added cone style array idea to the [idea section](../ideas).
- Added idea about defer on error to the [idea section](../ideas).
- Added idea for aliasing generic structs in the import to the [idea section](../ideas).
- Added idea for changing automatic signed <-> unsigned conversion to the [idea section](../ideas).
- Added [Changes from C](../changesfromc) and [Statements](../statements) sections.
- Removal of `volatile`. See [Changes from C](../changesfromc) and [Statements](../statements)
- Removal of `const` See [Changes from C](../changesfromc)
- "return" rather than function name is used in post conditions. See [Functions](/references/docs/functions#pre-and-post-conditions)
- Added "@include" macro for textual includes. See [Modules](/references/docs/modules#textual-includes).
- Files to without `module` for single file compilations is now ok as a special case. See [Modules](/references/docs/modules)
- Added cone style array idea to the [idea section](/references/docs/ideas).
- Added idea about defer on error to the [idea section](/references/docs/ideas).
- Added idea for aliasing generic structs in the import to the [idea section](/references/docs/ideas).
- Added idea for changing automatic signed <-> unsigned conversion to the [idea section](/references/docs/ideas).
- Added [Changes from C](/references/docs/changesfromc) and [Statements](/references/docs/statements) sections.
- Removal of `volatile`. See [Changes from C](/references/docs/changesfromc) and [Statements](/references/docs/statements)
- Removal of `const` See [Changes from C](/references/docs/changesfromc)


2 changes: 1 addition & 1 deletion src/content/docs/references/docs/arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,4 @@ by implementing "len" and "[]" methods and annotating them using the `@operator`
io::printfn("%d", i);
}

For more information, see [operator overloading](../operators)
For more information, see [operator overloading](/references/docs/operators)
6 changes: 3 additions & 3 deletions src/content/docs/references/docs/changesfromc.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ The `->` operator is removed, access uses dot for both direct and pointer access

##### Different operator precedence

Notably bit operations have higher precedence than +/-, making code like this: `a & b == c` evaluate like `(a & b) == c` instead of C's `a & (b == c)`. See the page about [precedence rules](../precedence).
Notably bit operations have higher precedence than +/-, making code like this: `a & b == c` evaluate like `(a & b) == c` instead of C's `a & (b == c)`. See the page about [precedence rules](/references/docs/precedence).

##### Removal of the const type qualifier

The const qualifier is only retained for actual constant variables. C3 uses a special type of [post condition](../contracts) for functions to indicate that they do not alter in parameters.
The const qualifier is only retained for actual constant variables. C3 uses a special type of [post condition](/references/docs/contracts) for functions to indicate that they do not alter in parameters.

```
/**
Expand Down Expand Up @@ -85,7 +85,7 @@ where there is only a single way to widen the expression. To explain the latter:
take the case of `long x = int_val_1 + int_val_2`. In C this would widen the result of the addition:
`long x = (long)(int_val_1 + int_val_2)`, but there is another possible
way to widen: `long x = (long)int_val_1 + (long)int_val_2`. so in this case, the widening
is disallowed. However, `long x = int_val_1` is unambiguous, so C3 permits it just like C (read more on the [conversion page](../conversion).
is disallowed. However, `long x = int_val_1` is unambiguous, so C3 permits it just like C (read more on the [conversion page](/references/docs/conversion).

C3 also adds *safe signed-unsigned comparisons*: this means that comparing signed and unsigned values will always yield the correct result:

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/references/docs/comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ Finally, a custom annotation, "@mycustom" is added. The compiler is free to sile
| @ensure | `@ensure <expre1>, <expr2>, ...` |
| @pure | `@pure` |

See [contracts](../contracts) for information regarding `@require`, `@ensure`, `@const`, `@pure`, `@checked`.
See [contracts](/references/docs/contracts) for information regarding `@require`, `@ensure`, `@const`, `@pure`, `@checked`.
2 changes: 1 addition & 1 deletion src/content/docs/references/docs/conversion.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Substructs may be used in place of its parent structs in many cases. The rule is

## Pointer conversions

Pointer conversion between types usually need explicit casts. The exception is `void *` which any type may implicitly convert *to* or *from*. Conversion rules from and to arrays are detailed under [arrays](../arrays)
Pointer conversion between types usually need explicit casts. The exception is `void *` which any type may implicitly convert *to* or *from*. Conversion rules from and to arrays are detailed under [arrays](/references/docs/arrays)

## Vector conversions

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/references/docs/define.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ and variables:
def int_max_foo = generic_foo::max_foo(<int>);
def double_max_foo = generic_foo::max_foo(<double>);

For more information, see the chapter on [generics](../generics).
For more information, see the chapter on [generics](/references/docs/generics).

## Function pointer default arguments and named parameters

Expand Down
12 changes: 6 additions & 6 deletions src/content/docs/references/docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ fn void print_file2(String filename)



Read more about optionals and error handling [here](../optionals).
Read more about optionals and error handling [here](/references/docs/optionals).

#### Contracts

Expand Down Expand Up @@ -394,7 +394,7 @@ fn int getLastElement(int* array, int length)
}
```

Read more about contracts [here](../contracts).
Read more about contracts [here](/references/docs/contracts).

#### Macros

Expand Down Expand Up @@ -471,7 +471,7 @@ fn void test()
}
```

Read more about macros [here](../macros).
Read more about macros [here](/references/docs/macros).

#### Methods

Expand Down Expand Up @@ -553,7 +553,7 @@ const long FIB19 = @fib(19);
// Same as const long FIB19 = 4181;
```

Read more about compile time execution [here](../compiletime).
Read more about compile time execution [here](/references/docs/compiletime).

#### Generic modules

Expand Down Expand Up @@ -615,7 +615,7 @@ fn void test()
}
```

Read more about generic modules [here](../generics)
Read more about generic modules [here](/references/docs/generics)

#### Dynamic calls

Expand Down Expand Up @@ -664,4 +664,4 @@ fn void main()
}
```

Read more about dynamic calls [here](../anyinterfaces).
Read more about dynamic calls [here](/references/docs/anyinterfaces).
4 changes: 2 additions & 2 deletions src/content/docs/references/docs/macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Macros
sidebar:
order: 119
---
The macro capabilities of C3 reaches across several constructs: macros (prefixed with `@` at invocation), [generic functions](../generics/#generic-functions), [generic modules](../generics/#generic-modules), compile time variables (prefixed with `$`), macro compile time execution (using `$if`, `$for`, `$foreach`, `$switch`) and attributes.
The macro capabilities of C3 reaches across several constructs: macros (prefixed with `@` at invocation), [generic functions](/references/docs/generics/#generic-functions), [generic modules](/references/docs/generics/#generic-modules), compile time variables (prefixed with `$`), macro compile time execution (using `$if`, `$for`, `$foreach`, `$switch`) and attributes.

## A quick comparison of C and C3 macros

Expand Down Expand Up @@ -247,7 +247,7 @@ Similar to regular *methods* a macro may also be associated with a particular ty
Foo f;
f.generate();

See the chapter on [functions](../functions) for more details.
See the chapter on [functions](/references/docs/functions) for more details.

## Capturing a trailing block

Expand Down
10 changes: 5 additions & 5 deletions src/content/docs/references/docs/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This would for example affect generated C headers.
Unlike C, C3 does not use type qualifiers. `const` exists,
but is a storage class modifier, not a type qualifier.
Instead of `volatile`, volatile loads and stores are used.
In order to signal restrictions on parameter usage, parameter [preconditions](../preconditions/) are used.
In order to signal restrictions on parameter usage, parameter [preconditions](/references/docs/preconditions/) are used.
`typedef` has a slightly different syntax and renamed `def`.

C3 also requires all function pointers to be used with an alias, so:
Expand Down Expand Up @@ -229,7 +229,7 @@ the raw `void*` pointer.
### Array types

Arrays are indicated by `[size]` after the type, e.g. `int[4]`. Slices use the `type[]`. For initialization the wildcard `type[*]` can be used to infer the size
from the initializer. See the chapter on [arrays](../arrays).
from the initializer. See the chapter on [arrays](/references/docs/arrays).

### Vector types

Expand Down Expand Up @@ -332,7 +332,7 @@ Using `inline` in the `distinct` declaration allows a distinct type to implicitl
// Inline type definition
MyList<Foo> bcd = MyList(<Foo>);

Read more about generic types on [the page about generics](../generics).
Read more about generic types on [the page about generics](/references/docs/generics).

## Enum

Expand Down Expand Up @@ -442,7 +442,7 @@ Only variables and return variables may be optionals. Function and macro paramet
int! x = 0; // Ok!


Read more about the optional types on the page about [optionals and error handling](../optionals).
Read more about the optional types on the page about [optionals and error handling](/references/docs/optionals).


## Struct types
Expand Down Expand Up @@ -470,7 +470,7 @@ A struct's members may be accessed using dot notation, even for pointers to stru

(One might wonder whether it's possible to take a `Person**` and use dot access. – It's not allowed, only one level of dereference is done.)

To change alignment and packing, optional [attributes](../attributes) such as `@packed` may be used.
To change alignment and packing, optional [attributes](/references/docs/attributes) such as `@packed` may be used.

## Struct subtyping

Expand Down
Loading

0 comments on commit 9817e09

Please sign in to comment.