球拍,包括,要求和提供不起作用

编程入门 行业动态 更新时间:2024-10-23 16:20:59
本文介绍了球拍,包括,要求和提供不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个名为functions.rkt"的文件,里面有一些函数.

I have a file with the name "functions.rkt", where I have some functions.

我正在处理另一个文件,我们将其命名为working.rkt"

And I am working in another file, let’s name it "working.rkt"

我在working.rkt"中尝试了以下(一一)以使用functions.rkt"中定义的函数:

I have tried the following (one by one) at "working.rkt" to use the function defined at "functions.rkt":

(require "functions.rkt") (include "functions.rkt") (provide "functions.rkt")

他们中的任何一个都没有工作,有什么帮助吗?

And anyone of them hasn’t worked, any help?

他们在同一条路上.

推荐答案

在functions.rkt"文件中:

In the file "functions.rkt:

#lang racket (provide my-function) (define (my-function x) (* 2 x))

在文件working.rkt"中:

In the file "working.rkt":

#lang racket (require "functions.rkt") (my-function 21)

更多推荐

球拍,包括,要求和提供不起作用

本文发布于:2023-11-01 23:14:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1550689.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:球拍   不起作用

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!