Skip to content

Commit 2d045f0

Browse files
v0.2.8é
1 parent 019a0a6 commit 2d045f0

10 files changed

Lines changed: 143 additions & 5 deletions

File tree

en/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![banner](banner_homepage.png)
22

3-
### Nelson 0.2.7.0
3+
### Nelson 0.2.8.0
44

55
This is an pre-release of Nelson.
66

en/SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* [abort](./interpreter/abort.md)
1616
* [break](./interpreter/break.md)
1717
* [continue](./interpreter/continue.md)
18+
* [dbstack](./interpreter/dbstack.md)
1819
* [for](./interpreter/for.md)
1920
* [function](./interpreter/function.md)
2021
* [if](./interpreter/if.md)
@@ -71,6 +72,7 @@
7172
* [error_manager](./error_manager/README.md)
7273
* [error](./error_manager/error.md)
7374
* [lasterror](./error_manager/lasterror.md)
75+
* [lastwarn](./error_manager/lastwarn.md)
7476
* [warning](./error_manager/warning.md)
7577

7678

en/error_manager/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ error handling functions
1010

1111
* [error](error.md) - Raise an error message.
1212
* [lasterror](lasterror.md) - Returns last recorded error message.
13+
* [lastwarn](lastwarn.md) - Returns last recorded warning message.
1314
* [warning](warning.md) - Display a warning message.
1415

1516

en/error_manager/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
* [error_manager](README.md)
22
* [error](error.md)
33
* [lasterror](lasterror.md)
4+
* [lastwarn](lastwarn.md)
45
* [warning](warning.md)
56

en/error_manager/lastwarn.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
2+
3+
# lastwarn
4+
5+
Returns last recorded warning message.
6+
7+
## Syntax
8+
9+
- last_message = lastwarn()
10+
- [last_message, last_identifier] = lastwarn()
11+
- lastwarn('')
12+
- lastwarn(new_message)
13+
- lastwarn(new_message, new_identifier)
14+
- [last_message, last_identifier] = lastwarn('')
15+
- [last_message, last_identifier] = lastwarn(new_message)
16+
- [last_message, last_identifier] = lastwarn(new_message, new_identifier)
17+
18+
## Output argument
19+
20+
- last_message - string: last warning message.
21+
- last_identifier - string: identifier.
22+
23+
## Description
24+
25+
26+
<p><b>last_message = lastwarn()</b> returns a string containing the last warning message.</p>
27+
<p><b>lastwarn('')</b> clears last warning.</p>
28+
29+
30+
## Example
31+
32+
```matlab
33+
[1:3]:3
34+
lastwarn
35+
[msg, id] = lastwarn()
36+
lastwarn('')
37+
[msg, id] = lastwarn()
38+
```
39+
40+
## See also
41+
42+
[error](error.md), [warning](warning.md).
43+
## History
44+
45+
|Version|Description|
46+
|------|------|
47+
|1.0.0|initial version|
48+
49+
50+
## Author
51+
52+
Allan CORNET
53+
54+
55+

en/error_manager/warning.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,49 @@ Display a warning message.
66

77
## Syntax
88

9+
- warning()
910
- warning(msg)
11+
- warning(id, msg)
12+
- warning(state)
13+
- warning(state, id)
14+
- st = warning()
15+
- warning(st)
16+
17+
## Input argument
18+
19+
- id - a string: identifier for the warning.
20+
- msg - a string: message to warn.
21+
- state - a string: 'on', 'off', 'aserror', 'all' or 'query'.
22+
- st - a struct: set warning settings.
1023

1124
## Output argument
1225

13-
- msg - a string.
26+
- st - a struct, warning settings.
1427

1528
## Description
1629

1730

1831
<p><b>warning</b> displays a warning message.</p>
32+
<p><b>warning('')</b> resets lastwarn state.</p>
1933

2034

21-
## Example
35+
## Examples
2236

2337
```matlab
2438
warning('your warning message.')
2539
```
40+
```matlab
41+
warning('on', 'myModule:identifier');
42+
warning('myModule:identifier', 'my message 1 on');
43+
warning('off', 'myModule:identifier');
44+
warning('myModule:identifier', 'my message 2 off');
45+
warning('aserror', 'myModule:identifier');
46+
warning('myModule:identifier', 'my message 3 as error');
47+
```
2648

2749
## See also
2850

29-
[lasterror](lasterror.md), [warning](error.md).
51+
[lasterror](lasterror.md), [error](error.md), [lastwarn](lastwarn.md).
3052
## History
3153

3254
|Version|Description|

en/interpreter/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ interpreter functions
1111
* [abort](abort.md) - stop evaluation.
1212
* [break](break.md) - exit evaluation loop.
1313
* [continue](continue.md) - continue evaluation in loop.
14+
* [dbstack](dbstack.md) - call stack.
1415
* [for](for.md) - for loop.
1516
* [function](function.md) - function declaration.
1617
* [if](if.md) - conditional statement.

en/interpreter/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* [abort](abort.md)
33
* [break](break.md)
44
* [continue](continue.md)
5+
* [dbstack](dbstack.md)
56
* [for](for.md)
67
* [function](function.md)
78
* [if](if.md)

en/interpreter/dbstack.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
2+
3+
# dbstack
4+
5+
call stack.
6+
7+
## Syntax
8+
9+
- dbstack
10+
- st = dbstack()
11+
- dbstack('-completenames')
12+
- st = dbstack('-completenames')
13+
- dbstack('-completenames', omit)
14+
- st = dbstack('-completenames', omit)
15+
16+
## Input argument
17+
18+
- omit - an integer value: Number of frames to omit (must be positive).
19+
20+
## Output argument
21+
22+
- st - a struct
23+
24+
## Description
25+
26+
27+
<p><b>dbstack</b> displays the file names and line numbers of the function calls.</p>
28+
<p><b>dbstack('-completenames')</b> displays the full file names.</p>
29+
30+
31+
## Example
32+
33+
Creates a myfun.nlf and calls it.
34+
```matlab
35+
function myfun(x)
36+
dbstack();
37+
end
38+
```
39+
40+
## See also
41+
42+
[which](../functions_manager/which.md).
43+
## History
44+
45+
|Version|Description|
46+
|------|------|
47+
|1.0.0|initial version|
48+
49+
50+
## Author
51+
52+
Allan CORNET
53+
54+
55+

fr/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![banner](banner_homepage.png)
22

3-
### Nelson 0.2.7.0
3+
### Nelson 0.2.8.0
44

55
Ceci est une version alpha de Nelson.
66

0 commit comments

Comments
 (0)