On Wednesday, 26 February 2020 at 08:25:00 UTC, Abby wrote:
Any idea why?
Ok so this is enough to produce the same result, it seems that
there is a problem in string switch when there is more the 6
cases.
extern(C) void main()
{
auto s = "F";
final switch(s)
{
case "A":
I have a simple enum of strings like so:
enum Alphabet : string
{
a = "A",
b = "B",
c = "C",
d = "D",
e = "E",
f = "F",
g = "G"
}
and then simple final switch like so:
extern(C) void main()
{
auto s = Alphabet.f;
final switch(s)
{
case
On Wednesday, 26 February 2020 at 08:25:00 UTC, Abby wrote:
/dlang/dmd/linux/bin64/../../src/druntime/import/object.d(2999): Error:
TypeInfo cannot be used with -betterC
Odd think is that wehen I remove g from my enum it compiles
just fine, so it seems that this compilation error occurs only
On Monday, 17 February 2020 at 19:02:50 UTC, Stefan Koch wrote:
Sorry I just realized I never published the code.
I am going to add it to ctfeutils.
Thank you very much
On Monday, 17 February 2020 at 19:02:50 UTC, Stefan Koch wrote:
Sorry I just realized I never published the code.
I am going to add it to ctfeutils.
Hi Stefan,
I'm sorry to bother you, I just wanted to kindly ask if you would
upload the formatter to ctfeutils on github it would help me alot.
Hi there guys,
I was trying to generated code during compile time. Bassicly I'm
creating a tokenizer and I would like to generated nested switch
using betterC.
Basically convert something like this:
enum tokens =
[
['!', '='],
['>', '='],
['>'],
];
to:
switch(str[i])
{
case
On Monday, 17 February 2020 at 11:05:46 UTC, Stefan Koch wrote:
On Monday, 17 February 2020 at 10:18:32 UTC, Abby wrote:
Hi there guys,
I was trying to generated code during compile time. Bassicly
I'm creating a tokenizer and I would like to generated nested
switch using betterC.
[...]
I
I would like to export some functions from my bettec dll for
dotnet core application in windows.
Right now I have compiled dll using dmd v2.091.0-dirty simply by
´dub build´
this is the function I have
extern(C) char* test_echo(const(char)* line, size_t len, ref
size_t resLen)
{
enum
What is the proper way to get char* from string which is used in
c functions? toStringz does returns:
/usr/include/dmd/phobos/std/array.d(965,49): Error: TypeInfo
cannot be used with -betterC
and I think string.ptr is not safe because it's not zero
termined. So what should I do? realloc
Hi there,
I'm using d2sqlite3 which has dependency on sqlite3.lib. When I'm
building my app on windows I have a dub.sdl which has a line
libs
"%USERPROFILE%/AppData/Local/dub/packages/d2sqlite3-0.18.3/d2sqlite3/lib/win64/sqlite3" platform="windows-x86_64-dmd"
but unless I specify full path
Is there a way to create a template that would do the same is glib
g_return_val_if_fail()
(https://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.html#g-return-val-if-fail)
I was hoping something like this would work
template returnValIfFail(alias expr, alias val)
{
Hi there,
I'm new in dlang I specially like betterC. I was hoping that d
fibers would be implemented in without using classes, but there
are not. Is there another way how to use async/await in dlang
better c?
Thank you for your help
Abby
Hello I would like to create validation mixin or mixin template
which would return on error.
Something like this:
```
mixin template Validate(a, b)
{
if(a > b)
{
writeln("invalid input");
return false;
}
}
bool test(a,b)
{
mixin Validate!(a,b);
on
Hi there,
I'm using d2sqlite3 package on windows with dub, the problem I
have is that when I compiling the app linking fails because LINK
: fatal error LNK1181: cannot open input file 'sqlite3.lib'. I
would like to know if there is a way to set path to lib to
downloaded with package instead
14 matches
Mail list logo