-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconsole-type.red
57 lines (48 loc) · 1 KB
/
console-type.red
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Red [
File: "console-type?"
Title: "console-type?"
Html-Proxy: https://
Description: {
}
Features: [
]
Builds:[
0.0.0.1.1.1
]
TODO: [
1 {allow todo: 1.}
2 {...}
]
]
unless value? '.redlang [
do https://redlang.red
]
.redlang [alias]
.console-type?: function [
/_build {Build number for developer}
/silent {don't print message on console}
/_debug {debug mode}
][
>builds: [
0.0.0.01.1 {Initial version}
]
if _build [
unless silent [
print >builds
]
return >builds
]
either (system/console = none) [
; for compiled version (no console)
return 'none
][
either system/console/gui? [
; for interpreted version with gui console
return 'gui
][
; for interpreted version with non-gui console (vscode)
return 'cli
]
]
]
.alias .console-type? [console-type?]